Add "Known problems" section to needless_borrow documentation

This commit is contained in:
Samuel Moelius 2023-07-12 20:15:54 -04:00
parent df92b5284e
commit 050b714c9d

View File

@ -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) {}