Skip to content

Commit

Permalink
Add "Known problems" section to needless_borrow documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Jul 13, 2023
1 parent df92b52 commit 050b714
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions clippy_lints/src/dereference.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
Expand Down

0 comments on commit 050b714

Please sign in to comment.