@@ -17,6 +17,7 @@ use super::{
1717 throw_ub_custom,
1818} ;
1919use crate :: fluent_generated as fluent;
20+ use crate :: interpret:: Writeable ;
2021
2122impl < ' tcx , M : Machine < ' tcx > > InterpCx < ' tcx , M > {
2223 pub fn cast (
@@ -358,7 +359,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
358359 fn unsize_into_ptr (
359360 & mut self ,
360361 src : & OpTy < ' tcx , M :: Provenance > ,
361- dest : & PlaceTy < ' tcx , M :: Provenance > ,
362+ dest : & impl Writeable < ' tcx , M :: Provenance > ,
362363 // The pointee types
363364 source_ty : Ty < ' tcx > ,
364365 cast_ty : Ty < ' tcx > ,
@@ -455,7 +456,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
455456 & mut self ,
456457 src : & OpTy < ' tcx , M :: Provenance > ,
457458 cast_ty : TyAndLayout < ' tcx > ,
458- dest : & PlaceTy < ' tcx , M :: Provenance > ,
459+ dest : & impl Writeable < ' tcx , M :: Provenance > ,
459460 ) -> InterpResult < ' tcx > {
460461 trace ! ( "Unsizing {:?} of type {} into {}" , * src, src. layout. ty, cast_ty. ty) ;
461462 match ( src. layout . ty . kind ( ) , cast_ty. ty . kind ( ) ) {
@@ -496,7 +497,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
496497 self . cur_span( ) ,
497498 "unsize_into: invalid conversion: {:?} -> {:?}" ,
498499 src. layout,
499- dest. layout
500+ dest. layout( )
500501 )
501502 }
502503 }
0 commit comments