]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/borrow_check/places_conflict.rs
Rollup merge of #69572 - matthiaskrgr:try_err_and_iter_on_ref, r=Centril
[rust.git] / src / librustc_mir / borrow_check / places_conflict.rs
index b95d1af11ad1d1c6fe64c250c83d3c773a79315b..984de021ca11276da6b3648c87a3ac3d76053d8b 100644 (file)
@@ -119,7 +119,7 @@ fn place_components_conflict<'tcx>(
     //    and either equal or disjoint.
     //  - If we did run out of access, the borrow can access a part of it.
 
-    let borrow_local = &borrow_place.local;
+    let borrow_local = borrow_place.local;
     let access_local = access_place.local;
 
     match place_base_conflict(borrow_local, access_local) {
@@ -293,7 +293,7 @@ fn place_components_conflict<'tcx>(
 // Given that the bases of `elem1` and `elem2` are always either equal
 // or disjoint (and have the same type!), return the overlap situation
 // between `elem1` and `elem2`.
-fn place_base_conflict(l1: &Local, l2: &Local) -> Overlap {
+fn place_base_conflict(l1: Local, l2: Local) -> Overlap {
     if l1 == l2 {
         // the same local - base case, equal
         debug!("place_element_conflict: DISJOINT-OR-EQ-LOCAL");
@@ -311,7 +311,7 @@ fn place_base_conflict(l1: &Local, l2: &Local) -> Overlap {
 fn place_projection_conflict<'tcx>(
     tcx: TyCtxt<'tcx>,
     body: &Body<'tcx>,
-    pi1_local: &Local,
+    pi1_local: Local,
     pi1_proj_base: &[PlaceElem<'tcx>],
     pi1_elem: &PlaceElem<'tcx>,
     pi2_elem: &PlaceElem<'tcx>,