]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_borrowck/src/dataflow.rs
Rollup merge of #105400 - BoxyUwU:braced_param_evaluatability, r=oli-obk
[rust.git] / compiler / rustc_borrowck / src / dataflow.rs
index 8070c0e6710ee0e1288cb9a0284fab5d47f8617f..f825b1d8f70ef502952699fe81e4aecf57edb849 100644 (file)
@@ -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(..)