Skip to content

Commit f9b8191

Browse files
committed
Remove implementation of min_align_of intrinsic
Since 88839 `min_align_of` is lowered to AlignOf operator.
1 parent 9f85cd6 commit f9b8191

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

compiler/rustc_const_eval/src/interpret/intrinsics.rs

+2-7
Original file line numberDiff line numberDiff 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)?;

0 commit comments

Comments
 (0)