File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
compiler/rustc_const_eval/src/interpret Expand file tree Collapse file tree 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>(
6262 ensure_monomorphic_enough ( tcx, tp_ty) ?;
6363 ConstValue :: from_bool ( tp_ty. needs_drop ( tcx, param_env) )
6464 }
65- sym:: min_align_of | sym :: pref_align_of => {
65+ sym:: pref_align_of => {
6666 // Correctly handles non-monomorphic calls, so there is no need for ensure_monomorphic_enough.
6767 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)
7469 }
7570 sym:: type_id => {
7671 ensure_monomorphic_enough ( tcx, tp_ty) ?;
You can’t perform that action at this time.
0 commit comments