Skip to content

Commit 3e62f7d

Browse files
committed
better comment
1 parent 9260f6f commit 3e62f7d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

clippy_lints/src/borrow_deref_ref.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ declare_clippy_lint! {
1414
/// Checks for `&*(&T)`.
1515
///
1616
/// ### Why is this bad?
17-
/// When people deref on an immutable reference `&T`, they may expect return `&U`.
18-
/// Accutually `&* (&T)` is still `&T`.
19-
/// if you want to deref explicitly, `&** (&T)` is what you need.
20-
/// If you want to reborrow, `&T` is enough (`&T` is Copy).
17+
/// Dereferencing and then borrowing a reference value has no effect in most cases.
2118
///
2219
/// ### Known problems
2320
/// false negative on such code:

0 commit comments

Comments
 (0)