@@ -17,6 +17,7 @@ use super::{
17
17
throw_ub_custom,
18
18
} ;
19
19
use crate :: fluent_generated as fluent;
20
+ use crate :: interpret:: Writeable ;
20
21
21
22
impl < ' tcx , M : Machine < ' tcx > > InterpCx < ' tcx , M > {
22
23
pub fn cast (
@@ -358,7 +359,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
358
359
fn unsize_into_ptr (
359
360
& mut self ,
360
361
src : & OpTy < ' tcx , M :: Provenance > ,
361
- dest : & PlaceTy < ' tcx , M :: Provenance > ,
362
+ dest : & impl Writeable < ' tcx , M :: Provenance > ,
362
363
// The pointee types
363
364
source_ty : Ty < ' tcx > ,
364
365
cast_ty : Ty < ' tcx > ,
@@ -455,7 +456,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
455
456
& mut self ,
456
457
src : & OpTy < ' tcx , M :: Provenance > ,
457
458
cast_ty : TyAndLayout < ' tcx > ,
458
- dest : & PlaceTy < ' tcx , M :: Provenance > ,
459
+ dest : & impl Writeable < ' tcx , M :: Provenance > ,
459
460
) -> InterpResult < ' tcx > {
460
461
trace ! ( "Unsizing {:?} of type {} into {}" , * src, src. layout. ty, cast_ty. ty) ;
461
462
match ( src. layout . ty . kind ( ) , cast_ty. ty . kind ( ) ) {
@@ -496,7 +497,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
496
497
self . cur_span( ) ,
497
498
"unsize_into: invalid conversion: {:?} -> {:?}" ,
498
499
src. layout,
499
- dest. layout
500
+ dest. layout( )
500
501
)
501
502
}
502
503
}
0 commit comments