We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
needless_borrow
1 parent df92b52 commit 050b714Copy full SHA for 050b714
clippy_lints/src/dereference.rs
@@ -77,6 +77,11 @@ declare_clippy_lint! {
77
/// Suggests that the receiver of the expression borrows
78
/// the expression.
79
///
80
+ /// ### Known problems
81
+ /// The lint cannot tell when the implementation of a trait
82
+ /// for `&T` and `T` do different things. Removing a borrow
83
+ /// in such a case can change the semantics of the code.
84
+ ///
85
/// ### Example
86
/// ```rust
87
/// fn fun(_a: &i32) {}
0 commit comments