diff options
| author | Philipp Krones <hello@philkrones.com> | 2018-10-19 01:32:57 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-19 01:32:57 +0200 |
| commit | b1d0343749bdc87e5cbbe7f1aeaa9d2a2c9dbc5b (patch) | |
| tree | ccfe805e3405b8968108108b37962a9c85d23b1c | |
| parent | 8f5a2484a05448dc7e19f8711a965fa5f232f0c1 (diff) | |
| parent | fd2f6dd3824b32af031d19830b6ccdc732dd3dfc (diff) | |
| download | rust-b1d0343749bdc87e5cbbe7f1aeaa9d2a2c9dbc5b.tar.gz rust-b1d0343749bdc87e5cbbe7f1aeaa9d2a2c9dbc5b.zip | |
Merge pull request #3334 from matthiaskrgr/new-ret-no-self__doc
new_ret_no_self: add sample from #3313 to Known Problems section.
| -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)] |
