@@ -34,8 +34,8 @@ use rustc_hir::def_id::{DefId, LocalDefId};
34
34
use rustc_index:: vec:: IndexVec ;
35
35
use rustc_middle:: mir:: visit:: Visitor ;
36
36
use rustc_middle:: mir:: {
37
- AggregateKind , BindingForm , Body , CastKind , LocalDecl , LocalInfo , LocalKind , Location , Operand ,
38
- Rvalue , StatementKind ,
37
+ AggregateKind , BindingForm , Body , LocalDecl , LocalInfo , LocalKind , Location , Operand , Rvalue ,
38
+ StatementKind ,
39
39
} ;
40
40
use rustc_middle:: ty:: tls;
41
41
use rustc_middle:: ty:: { GenericArgKind , Ty , TyCtxt , TyKind , WithOptConstParam } ;
@@ -394,15 +394,6 @@ fn label_rvalue_tys<'tcx>(acx: &mut AnalysisCtxt<'_, 'tcx>, mir: &Body<'tcx>) {
394
394
}
395
395
_ => continue ,
396
396
} ,
397
- Rvalue :: Cast ( CastKind :: PointerFromExposedAddress , ref op, ty) => {
398
- // We support only one case here, which is the case of null pointers
399
- // constructed via casts such as `0 as *const T`
400
- if let Some ( true ) = op. constant ( ) . cloned ( ) . map ( util:: is_null_const) {
401
- acx. assign_pointer_ids ( ty)
402
- } else {
403
- panic ! ( "Creating non-null pointers from exposed addresses not supported" ) ;
404
- }
405
- }
406
397
Rvalue :: Cast ( _, _, ty) => acx. assign_pointer_ids ( ty) ,
407
398
_ => continue ,
408
399
} ;
0 commit comments