]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_borrowck/src/used_muts.rs
codegen: use new {re,de,}allocator annotations in llvm
[rust.git] / compiler / rustc_borrowck / src / used_muts.rs
index 1093167fa82998885977479cb2d7bac858cd7799..8833753b12c5d53da2c6b77ce1386999bbb97d4f 100644 (file)
@@ -91,8 +91,8 @@ fn visit_statement(&mut self, statement: &Statement<'tcx>, location: Location) {
         self.super_statement(statement, location);
     }
 
-    fn visit_local(&mut self, local: &Local, place_context: PlaceContext, location: Location) {
-        if place_context.is_place_assignment() && self.temporary_used_locals.contains(local) {
+    fn visit_local(&mut self, local: Local, place_context: PlaceContext, location: Location) {
+        if place_context.is_place_assignment() && self.temporary_used_locals.contains(&local) {
             // Propagate the Local assigned at this Location as a used mutable local variable
             for moi in &self.mbcx.move_data.loc_map[location] {
                 let mpi = &self.mbcx.move_data.moves[*moi].path;