@@ -21,7 +21,7 @@ fn branches<'tcx>(
2121) -> ValTreeCreationResult < ' tcx > {
2222 let place = match variant {
2323 Some ( variant) => ecx. project_downcast ( place, variant) . unwrap ( ) ,
24- None => * place,
24+ None => place. clone ( ) ,
2525 } ;
2626 let variant = variant. map ( |variant| Some ( ty:: ValTree :: Leaf ( ScalarInt :: from ( variant. as_u32 ( ) ) ) ) ) ;
2727 debug ! ( ?place, ?variant) ;
@@ -290,7 +290,7 @@ pub fn valtree_to_const_value<'tcx>(
290290 debug ! ( ?place) ;
291291
292292 valtree_into_mplace ( & mut ecx, & mut place, valtree) ;
293- dump_place ( & ecx, place. into ( ) ) ;
293+ dump_place ( & ecx, place. clone ( ) . into ( ) ) ;
294294 intern_const_alloc_recursive ( & mut ecx, InternKind :: Constant , & place) . unwrap ( ) ;
295295
296296 match ty. kind ( ) {
@@ -352,7 +352,7 @@ fn valtree_into_mplace<'tcx>(
352352 debug ! ( ?pointee_place) ;
353353
354354 valtree_into_mplace ( ecx, & mut pointee_place, valtree) ;
355- dump_place ( ecx, pointee_place. into ( ) ) ;
355+ dump_place ( ecx, pointee_place. clone ( ) . into ( ) ) ;
356356 intern_const_alloc_recursive ( ecx, InternKind :: Constant , & pointee_place) . unwrap ( ) ;
357357
358358 let imm = match inner_ty. kind ( ) {
@@ -389,7 +389,7 @@ fn valtree_into_mplace<'tcx>(
389389 Some ( variant_idx) ,
390390 )
391391 }
392- _ => ( * place, branches, None ) ,
392+ _ => ( place. clone ( ) , branches, None ) ,
393393 } ;
394394 debug ! ( ?place_adjusted, ?branches) ;
395395
0 commit comments