@@ -21,7 +21,7 @@ fn branches<'tcx>(
21
21
) -> ValTreeCreationResult < ' tcx > {
22
22
let place = match variant {
23
23
Some ( variant) => ecx. project_downcast ( place, variant) . unwrap ( ) ,
24
- None => * place,
24
+ None => place. clone ( ) ,
25
25
} ;
26
26
let variant = variant. map ( |variant| Some ( ty:: ValTree :: Leaf ( ScalarInt :: from ( variant. as_u32 ( ) ) ) ) ) ;
27
27
debug ! ( ?place, ?variant) ;
@@ -290,7 +290,7 @@ pub fn valtree_to_const_value<'tcx>(
290
290
debug ! ( ?place) ;
291
291
292
292
valtree_into_mplace ( & mut ecx, & mut place, valtree) ;
293
- dump_place ( & ecx, place. into ( ) ) ;
293
+ dump_place ( & ecx, place. clone ( ) . into ( ) ) ;
294
294
intern_const_alloc_recursive ( & mut ecx, InternKind :: Constant , & place) . unwrap ( ) ;
295
295
296
296
match ty. kind ( ) {
@@ -352,7 +352,7 @@ fn valtree_into_mplace<'tcx>(
352
352
debug ! ( ?pointee_place) ;
353
353
354
354
valtree_into_mplace ( ecx, & mut pointee_place, valtree) ;
355
- dump_place ( ecx, pointee_place. into ( ) ) ;
355
+ dump_place ( ecx, pointee_place. clone ( ) . into ( ) ) ;
356
356
intern_const_alloc_recursive ( ecx, InternKind :: Constant , & pointee_place) . unwrap ( ) ;
357
357
358
358
let imm = match inner_ty. kind ( ) {
@@ -389,7 +389,7 @@ fn valtree_into_mplace<'tcx>(
389
389
Some ( variant_idx) ,
390
390
)
391
391
}
392
- _ => ( * place, branches, None ) ,
392
+ _ => ( place. clone ( ) , branches, None ) ,
393
393
} ;
394
394
debug ! ( ?place_adjusted, ?branches) ;
395
395
0 commit comments