Add "Known problems" section to needless_borrow
documentation
This commit is contained in:
parent
df92b5284e
commit
050b714c9d
@ -77,6 +77,11 @@ declare_clippy_lint! {
|
|||||||
/// Suggests that the receiver of the expression borrows
|
/// Suggests that the receiver of the expression borrows
|
||||||
/// the expression.
|
/// 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
|
/// ### Example
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// fn fun(_a: &i32) {}
|
/// fn fun(_a: &i32) {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user