diff options
| author | Samuel Moelius <sam@moeli.us> | 2023-07-12 20:15:54 -0400 |
|---|---|---|
| committer | Samuel Moelius <sam@moeli.us> | 2023-07-12 20:15:54 -0400 |
| commit | 050b714c9d638d57408d7ff7d14afd5d206525f2 (patch) | |
| tree | 30c8963f2dec3a9b157e258cdbe6866a7e4ec5e1 | |
| parent | df92b5284eb2ce7e6a6742f5579c42d034a9c2b1 (diff) | |
| download | rust-050b714c9d638d57408d7ff7d14afd5d206525f2.tar.gz rust-050b714c9d638d57408d7ff7d14afd5d206525f2.zip | |
Add "Known problems" section to `needless_borrow` documentation
| -rw-r--r-- | clippy_lints/src/dereference.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clippy_lints/src/dereference.rs b/clippy_lints/src/dereference.rs index 3af552e5016..cdf64b96036 100644 --- a/clippy_lints/src/dereference.rs +++ b/clippy_lints/src/dereference.rs @@ -77,6 +77,11 @@ declare_clippy_lint! { /// Suggests that the receiver of the expression borrows /// the expression. /// + /// ### Known problems + /// The lint cannot tell when the implementation of a trait + /// for `&T` and `T` do different things. Removing a borrow + /// in such a case can change the semantics of the code. + /// /// ### Example /// ```rust /// fn fun(_a: &i32) {} |
