X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_borrowck%2Fsrc%2Fdataflow.rs;h=f825b1d8f70ef502952699fe81e4aecf57edb849;hb=b23419b03da767954ad0fb92ac3be729417cf381;hp=8070c0e6710ee0e1288cb9a0284fab5d47f8617f;hpb=341d8b8a2c290b4535e965867e876b095461ff6e;p=rust.git diff --git a/compiler/rustc_borrowck/src/dataflow.rs b/compiler/rustc_borrowck/src/dataflow.rs index 8070c0e6710..f825b1d8f70 100644 --- a/compiler/rustc_borrowck/src/dataflow.rs +++ b/compiler/rustc_borrowck/src/dataflow.rs @@ -358,9 +358,9 @@ fn statement_effect( stmt: &mir::Statement<'tcx>, location: Location, ) { - match stmt.kind { - mir::StatementKind::Assign(box (lhs, ref rhs)) => { - if let mir::Rvalue::Ref(_, _, place) = *rhs { + match &stmt.kind { + mir::StatementKind::Assign(box (lhs, rhs)) => { + if let mir::Rvalue::Ref(_, _, place) = rhs { if place.ignore_borrow( self.tcx, self.body, @@ -377,13 +377,13 @@ fn statement_effect( // Make sure there are no remaining borrows for variables // that are assigned over. - self.kill_borrows_on_place(trans, lhs); + self.kill_borrows_on_place(trans, *lhs); } mir::StatementKind::StorageDead(local) => { // Make sure there are no remaining borrows for locals that // are gone out of scope. - self.kill_borrows_on_place(trans, Place::from(local)); + self.kill_borrows_on_place(trans, Place::from(*local)); } mir::StatementKind::FakeRead(..)