@@ -39,7 +39,7 @@ use rustc_session::Session;
3939use rustc_span:: symbol:: sym;
4040use rustc_span:: Symbol ;
4141use rustc_span:: { DebuggerVisualizerFile , DebuggerVisualizerType } ;
42- use rustc_target:: abi:: { Align , Size , VariantIdx } ;
42+ use rustc_target:: abi:: { Align , VariantIdx } ;
4343
4444use std:: collections:: BTreeSet ;
4545use std:: time:: { Duration , Instant } ;
@@ -273,13 +273,6 @@ pub fn cast_to_dyn_star<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
273273 matches!( dst_ty. kind( ) , ty:: Dynamic ( _, _, ty:: DynStar ) ) ,
274274 "destination type must be a dyn*"
275275 ) ;
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- } ;
283276 ( src, unsized_info ( bx, src_ty_and_layout. ty , dst_ty, old_info) )
284277}
285278
0 commit comments