@@ -119,10 +119,10 @@ fn place_components_conflict<'tcx>(
119
119
// and either equal or disjoint.
120
120
// - If we did run out of access, the borrow can access a part of it.
121
121
122
- let borrow_local = & borrow_place. local ;
122
+ let borrow_local = borrow_place. local ;
123
123
let access_local = access_place. local ;
124
124
125
- match place_base_conflict ( borrow_local, access_local) {
125
+ match place_base_conflict ( borrow_local, * access_local) {
126
126
Overlap :: Arbitrary => {
127
127
bug ! ( "Two base can't return Arbitrary" ) ;
128
128
}
@@ -208,7 +208,7 @@ fn place_components_conflict<'tcx>(
208
208
// access cares about.
209
209
210
210
let proj_base = & borrow_place. projection [ ..access_place. projection . len ( ) + i] ;
211
- let base_ty = Place :: ty_from ( borrow_local, proj_base, body, tcx) . ty ;
211
+ let base_ty = Place :: ty_from ( & borrow_local, proj_base, body, tcx) . ty ;
212
212
213
213
match ( elem, & base_ty. kind , access) {
214
214
( _, _, Shallow ( Some ( ArtificialField :: ArrayLength ) ) )
@@ -293,7 +293,7 @@ fn place_components_conflict<'tcx>(
293
293
// Given that the bases of `elem1` and `elem2` are always either equal
294
294
// or disjoint (and have the same type!), return the overlap situation
295
295
// between `elem1` and `elem2`.
296
- fn place_base_conflict ( l1 : & Local , l2 : & Local ) -> Overlap {
296
+ fn place_base_conflict ( l1 : Local , l2 : Local ) -> Overlap {
297
297
if l1 == l2 {
298
298
// the same local - base case, equal
299
299
debug ! ( "place_element_conflict: DISJOINT-OR-EQ-LOCAL" ) ;
@@ -311,7 +311,7 @@ fn place_base_conflict(l1: &Local, l2: &Local) -> Overlap {
311
311
fn place_projection_conflict < ' tcx > (
312
312
tcx : TyCtxt < ' tcx > ,
313
313
body : & Body < ' tcx > ,
314
- pi1_local : & Local ,
314
+ pi1_local : Local ,
315
315
pi1_proj_base : & [ PlaceElem < ' tcx > ] ,
316
316
pi1_elem : & PlaceElem < ' tcx > ,
317
317
pi2_elem : & PlaceElem < ' tcx > ,
@@ -329,7 +329,7 @@ fn place_projection_conflict<'tcx>(
329
329
debug ! ( "place_element_conflict: DISJOINT-OR-EQ-FIELD" ) ;
330
330
Overlap :: EqualOrDisjoint
331
331
} else {
332
- let ty = Place :: ty_from ( pi1_local, pi1_proj_base, body, tcx) . ty ;
332
+ let ty = Place :: ty_from ( & pi1_local, pi1_proj_base, body, tcx) . ty ;
333
333
match ty. kind {
334
334
ty:: Adt ( def, _) if def. is_union ( ) => {
335
335
// Different fields of a union, we are basically stuck.
0 commit comments