@@ -62,11 +62,6 @@ crate fn eval_nullary_intrinsic<'tcx>(
62
62
ensure_monomorphic_enough ( tcx, tp_ty) ?;
63
63
ConstValue :: from_bool ( tp_ty. needs_drop ( tcx, param_env) )
64
64
}
65
- sym:: pref_align_of => {
66
- // Correctly handles non-monomorphic calls, so there is no need for ensure_monomorphic_enough.
67
- let layout = tcx. layout_of ( param_env. and ( tp_ty) ) . map_err ( |e| err_inval ! ( Layout ( e) ) ) ?;
68
- ConstValue :: from_machine_usize ( layout. align . pref . bytes ( ) , & tcx)
69
- }
70
65
sym:: type_id => {
71
66
ensure_monomorphic_enough ( tcx, tp_ty) ?;
72
67
ConstValue :: from_u64 ( tcx. type_id_hash ( tp_ty) )
@@ -155,14 +150,10 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
155
150
self . write_scalar ( Scalar :: from_machine_usize ( result, self ) , dest) ?;
156
151
}
157
152
158
- sym:: pref_align_of
159
- | sym:: needs_drop
160
- | sym:: type_id
161
- | sym:: type_name
162
- | sym:: variant_count => {
153
+ sym:: needs_drop | sym:: type_id | sym:: type_name | sym:: variant_count => {
163
154
let gid = GlobalId { instance, promoted : None } ;
164
155
let ty = match intrinsic_name {
165
- sym:: pref_align_of | sym :: variant_count => self . tcx . types . usize ,
156
+ sym:: variant_count => self . tcx . types . usize ,
166
157
sym:: needs_drop => self . tcx . types . bool ,
167
158
sym:: type_id => self . tcx . types . u64 ,
168
159
sym:: type_name => self . tcx . mk_static_str ( ) ,
0 commit comments