1
Fork 0

Avoid cloning Place in limit_capture_mutability

This commit is contained in:
Santiago Pastorino 2019-07-19 20:59:59 +02:00
parent 10470797a6
commit 2ffd3c64f9

View file

@ -531,9 +531,9 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
elem: ProjectionElem::Deref,
}),
} => {
let place = Place {
base: base.clone(),
projection: base_proj.clone(),
let place = PlaceRef {
base,
projection: base_proj,
};
// Not projected from the implicit `self` in a closure.