@@ -39,7 +39,7 @@ use rustc_session::Session;
39
39
use rustc_span:: symbol:: sym;
40
40
use rustc_span:: Symbol ;
41
41
use rustc_span:: { DebuggerVisualizerFile , DebuggerVisualizerType } ;
42
- use rustc_target:: abi:: { Align , Size , VariantIdx } ;
42
+ use rustc_target:: abi:: { Align , VariantIdx } ;
43
43
44
44
use std:: collections:: BTreeSet ;
45
45
use std:: time:: { Duration , Instant } ;
@@ -273,13 +273,6 @@ pub fn cast_to_dyn_star<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
273
273
matches!( dst_ty. kind( ) , ty:: Dynamic ( _, _, ty:: DynStar ) ) ,
274
274
"destination type must be a dyn*"
275
275
) ;
276
- // FIXME(dyn-star): this is probably not the best way to check if this is
277
- // a pointer, and really we should ensure that the value is a suitable
278
- // pointer earlier in the compilation process.
279
- let src = match src_ty_and_layout. pointee_info_at ( bx. cx ( ) , Size :: ZERO ) {
280
- Some ( _) => bx. ptrtoint ( src, bx. cx ( ) . type_isize ( ) ) ,
281
- None => bx. bitcast ( src, bx. type_isize ( ) ) ,
282
- } ;
283
276
( src, unsized_info ( bx, src_ty_and_layout. ty , dst_ty, old_info) )
284
277
}
285
278
0 commit comments