diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2018-10-18 23:31:11 +0200 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2018-10-18 23:37:43 +0200 |
| commit | fd2f6dd3824b32af031d19830b6ccdc732dd3dfc (patch) | |
| tree | ccfe805e3405b8968108108b37962a9c85d23b1c | |
| parent | 8f5a2484a05448dc7e19f8711a965fa5f232f0c1 (diff) | |
| download | rust-fd2f6dd3824b32af031d19830b6ccdc732dd3dfc.tar.gz rust-fd2f6dd3824b32af031d19830b6ccdc732dd3dfc.zip | |
new_ret_no_self: add sample from #3313 to Known Problems section.
fix trivial typo on the way
| -rw-r--r-- | clippy_lints/src/methods/mod.rs | 3 | ||||
| -rw-r--r-- | 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 11ed1e70e38..6d22abf2d33 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<Self, E> {}` /// /// **Example:** /// ```rust diff --git a/clippy_lints/src/ptr_offset_with_cast.rs b/clippy_lints/src/ptr_offset_with_cast.rs index 38a9bbf6d4c..58afdc351d1 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)] |
