Skip to content

Commit b1d0343

Browse files
authored
Merge pull request #3334 from matthiaskrgr/new-ret-no-self__doc
new_ret_no_self: add sample from #3313 to Known Problems section.
2 parents 8f5a248 + fd2f6dd commit b1d0343

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

clippy_lints/src/methods/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,8 @@ declare_clippy_lint! {
452452
/// **Why is this bad?** As a convention, `new` methods are used to make a new
453453
/// instance of a type.
454454
///
455-
/// **Known problems:** None.
455+
/// **Known problems:** The lint fires when the return type is wrapping `Self`.
456+
/// Example: `fn new() -> Result<Self, E> {}`
456457
///
457458
/// **Example:**
458459
/// ```rust

clippy_lints/src/ptr_offset_with_cast.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ use std::fmt;
4141
declare_clippy_lint! {
4242
pub PTR_OFFSET_WITH_CAST,
4343
complexity,
44-
"uneeded pointer offset cast"
44+
"unneeded pointer offset cast"
4545
}
4646

4747
#[derive(Copy, Clone, Debug)]

0 commit comments

Comments
 (0)