Skip to content

Commit fd2f6dd

Browse files
committed
new_ret_no_self: add sample from #3313 to Known Problems section.
fix trivial typo on the way
1 parent 8f5a248 commit fd2f6dd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Diff for: 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

Diff for: 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)