self.check_if_path_or_subpath_is_moved(
location,
InitializationRequiringAction::Use,
- (place.as_place_ref(), span),
+ (place.as_ref(), span),
flow_state,
);
}
self.check_if_path_or_subpath_is_moved(
location,
InitializationRequiringAction::Use,
- (output.as_place_ref(), o.span),
+ (output.as_ref(), o.span),
flow_state,
);
} else {
self.check_if_path_or_subpath_is_moved(
location,
InitializationRequiringAction::Update,
- (place_span.0.as_place_ref(), place_span.1),
+ (place_span.0.as_ref(), place_span.1),
flow_state,
);
}
self.check_if_path_or_subpath_is_moved(
location,
action,
- (place.as_place_ref(), span),
+ (place.as_ref(), span),
flow_state,
);
}
self.check_if_path_or_subpath_is_moved(
location,
InitializationRequiringAction::Use,
- (place.as_place_ref(), span),
+ (place.as_ref(), span),
flow_state,
);
}
fn propagate_closure_used_mut_upvar(&mut self, operand: &Operand<'tcx>) {
let propagate_closure_used_mut_place = |this: &mut Self, place: &Place<'tcx>| {
if place.projection.is_some() {
- if let Some(field) = this.is_upvar_field_projection(place.as_place_ref()) {
+ if let Some(field) = this.is_upvar_field_projection(place.as_ref()) {
this.used_mut_upvars.push(field);
}
} else if let PlaceBase::Local(local) = place.base {
self.check_if_path_or_subpath_is_moved(
location,
InitializationRequiringAction::Use,
- (place.as_place_ref(), span),
+ (place.as_ref(), span),
flow_state,
);
}
self.check_if_path_or_subpath_is_moved(
location,
InitializationRequiringAction::Use,
- (place.as_place_ref(), span),
+ (place.as_ref(), span),
flow_state,
);
}
) {
debug!("check_for_invalidation_at_exit({:?})", borrow);
let place = &borrow.borrowed_place;
- let root_place = self.prefixes(place.as_place_ref(), PrefixSet::All).last().unwrap();
+ let root_place = self.prefixes(place.as_ref(), PrefixSet::All).last().unwrap();
// FIXME(nll-rfc#40): do more precise destructor tracking here. For now
// we just know that all locals are dropped at function exit (otherwise
self.report_mutability_error(
place,
span,
- &Place {
- base: _place_err.0.clone(),
- projection: _place_err.1.clone(),
+ PlaceRef {
+ base: _place_err.0,
+ projection: _place_err.1,
},
error_access,
location,
self.report_mutability_error(
place,
span,
- &Place {
- base: the_place_err.0.clone(),
- projection: the_place_err.1.clone(),
+ PlaceRef {
+ base: the_place_err.0,
+ projection: the_place_err.1,
},
error_access,
location,