Skip to content

Commit 81cb5fe

Browse files
committed
new_ret_no_self: add sample from #3313 to Known Problems section.
1 parent 8f5a248 commit 81cb5fe

File tree

1 file changed

+2
-1
lines changed
  • clippy_lints/src/methods

1 file changed

+2
-1
lines changed

clippy_lints/src/methods/mod.rs

Lines changed: 2 additions & 1 deletion
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

0 commit comments

Comments
 (0)