File tree 1 file changed +2
-7
lines changed
compiler/rustc_const_eval/src/interpret
1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -62,15 +62,10 @@ 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:: min_align_of | sym :: pref_align_of => {
65
+ sym:: pref_align_of => {
66
66
// Correctly handles non-monomorphic calls, so there is no need for ensure_monomorphic_enough.
67
67
let layout = tcx. layout_of ( param_env. and ( tp_ty) ) . map_err ( |e| err_inval ! ( Layout ( e) ) ) ?;
68
- let n = match name {
69
- sym:: pref_align_of => layout. align . pref . bytes ( ) ,
70
- sym:: min_align_of => layout. align . abi . bytes ( ) ,
71
- _ => bug ! ( ) ,
72
- } ;
73
- ConstValue :: from_machine_usize ( n, & tcx)
68
+ ConstValue :: from_machine_usize ( layout. align . pref . bytes ( ) , & tcx)
74
69
}
75
70
sym:: type_id => {
76
71
ensure_monomorphic_enough ( tcx, tp_ty) ?;
You can’t perform that action at this time.
0 commit comments