From fd2f6dd3824b32af031d19830b6ccdc732dd3dfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Thu, 18 Oct 2018 23:31:11 +0200 Subject: [PATCH] new_ret_no_self: add sample from #3313 to Known Problems section. fix trivial typo on the way --- clippy_lints/src/methods/mod.rs | 3 ++- clippy_lints/src/ptr_offset_with_cast.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/methods/mod.rs b/clippy_lints/src/methods/mod.rs index 11ed1e70e388..6d22abf2d339 100644 --- a/clippy_lints/src/methods/mod.rs +++ b/clippy_lints/src/methods/mod.rs @@ -452,7 +452,8 @@ declare_clippy_lint! { /// **Why is this bad?** As a convention, `new` methods are used to make a new /// instance of a type. /// -/// **Known problems:** None. +/// **Known problems:** The lint fires when the return type is wrapping `Self`. +/// Example: `fn new() -> Result {}` /// /// **Example:** /// ```rust diff --git a/clippy_lints/src/ptr_offset_with_cast.rs b/clippy_lints/src/ptr_offset_with_cast.rs index 38a9bbf6d4c4..58afdc351d19 100644 --- a/clippy_lints/src/ptr_offset_with_cast.rs +++ b/clippy_lints/src/ptr_offset_with_cast.rs @@ -41,7 +41,7 @@ use std::fmt; declare_clippy_lint! { pub PTR_OFFSET_WITH_CAST, complexity, - "uneeded pointer offset cast" + "unneeded pointer offset cast" } #[derive(Copy, Clone, Debug)]