We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
copy_deref
1 parent 68dbc84 commit dff9164Copy full SHA for dff9164
clippy_utils/src/mir/possible_borrower.rs
@@ -69,7 +69,7 @@ impl<'a, 'b, 'tcx> mir::visit::Visitor<'tcx> for PossibleBorrowerVisitor<'a, 'b,
69
fn visit_assign(&mut self, place: &mir::Place<'tcx>, rvalue: &mir::Rvalue<'_>, _location: mir::Location) {
70
let lhs = place.local;
71
match rvalue {
72
- mir::Rvalue::Ref(_, _, borrowed) => {
+ mir::Rvalue::Ref(_, _, borrowed) | mir::Rvalue::CopyForDeref(borrowed) => {
73
self.possible_borrower.add(borrowed.local, lhs);
74
},
75
other => {
0 commit comments