Skip to content

Commit 2ffd3c6

Browse files
committed
Avoid cloning Place in limit_capture_mutability
1 parent 1047079 commit 2ffd3c6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustc_mir/build/expr/as_rvalue.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -531,9 +531,9 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
531531
elem: ProjectionElem::Deref,
532532
}),
533533
} => {
534-
let place = Place {
535-
base: base.clone(),
536-
projection: base_proj.clone(),
534+
let place = PlaceRef {
535+
base,
536+
projection: base_proj,
537537
};
538538

539539
// Not projected from the implicit `self` in a closure.

0 commit comments

Comments
 (0)