@@ -169,10 +169,10 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
169
169
) -> Result < ( ) , ( ) > {
170
170
match place {
171
171
PlaceRef { local, projection : [ ] } => {
172
- self . append_local_to_string ( * local, buf) ?;
172
+ self . append_local_to_string ( local, buf) ?;
173
173
}
174
174
PlaceRef { local, projection : [ ProjectionElem :: Deref ] }
175
- if self . body . local_decls [ * local] . is_ref_for_guard ( ) =>
175
+ if self . body . local_decls [ local] . is_ref_for_guard ( ) =>
176
176
{
177
177
self . append_place_to_string (
178
178
PlaceRef { local : local, projection : & [ ] } ,
@@ -182,9 +182,9 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
182
182
) ?;
183
183
}
184
184
PlaceRef { local, projection : [ ProjectionElem :: Deref ] }
185
- if self . body . local_decls [ * local] . is_ref_to_static ( ) =>
185
+ if self . body . local_decls [ local] . is_ref_to_static ( ) =>
186
186
{
187
- let local_info = & self . body . local_decls [ * local] . local_info ;
187
+ let local_info = & self . body . local_decls [ local] . local_info ;
188
188
if let LocalInfo :: StaticRef { def_id, .. } = * local_info {
189
189
buf. push_str ( & self . infcx . tcx . item_name ( def_id) . as_str ( ) ) ;
190
190
} else {
@@ -307,7 +307,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
307
307
// FIXME Place2 Make this work iteratively
308
308
match place {
309
309
PlaceRef { local, projection : [ ] } => {
310
- let local = & self . body . local_decls [ * local] ;
310
+ let local = & self . body . local_decls [ local] ;
311
311
self . describe_field_from_ty ( & local. ty , field, None )
312
312
}
313
313
PlaceRef { local, projection : [ proj_base @ .., elem] } => match elem {
@@ -316,7 +316,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
316
316
}
317
317
ProjectionElem :: Downcast ( _, variant_index) => {
318
318
let base_ty =
319
- Place :: ty_from ( place. local , place. projection , * self . body , self . infcx . tcx )
319
+ Place :: ty_from ( & place. local , place. projection , * self . body , self . infcx . tcx )
320
320
. ty ;
321
321
self . describe_field_from_ty ( & base_ty, field, Some ( * variant_index) )
322
322
}
@@ -447,7 +447,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
447
447
448
448
// If we didn't find an overloaded deref or index, then assume it's a
449
449
// built in deref and check the type of the base.
450
- let base_ty = Place :: ty_from ( deref_base. local , deref_base. projection , * self . body , tcx) . ty ;
450
+ let base_ty = Place :: ty_from ( & deref_base. local , deref_base. projection , * self . body , tcx) . ty ;
451
451
if base_ty. is_unsafe_ptr ( ) {
452
452
BorrowedContentSource :: DerefRawPointer
453
453
} else if base_ty. is_mutable_ptr ( ) {
0 commit comments