diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2021-09-15 14:57:03 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-15 14:57:03 -0700 |
| commit | d11ee806a409829ce1407d111df3c902d6ad095d (patch) | |
| tree | dd3e8d000b3f08424507db47cdd198f645fb228f | |
| parent | cad1efae578da9b2a4d48fe2973fd8728d04515a (diff) | |
| parent | f9b8191282da80fff41f496d4b2e8e4dcd3502ed (diff) | |
| download | rust-d11ee806a409829ce1407d111df3c902d6ad095d.tar.gz rust-d11ee806a409829ce1407d111df3c902d6ad095d.zip | |
Rollup merge of #88933 - tmiasko:remove-min-align-of, r=oli-obk
Remove implementation of `min_align_of` intrinsic Since #88839 `min_align_of` is lowered to AlignOf operator.
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/intrinsics.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/intrinsics.rs b/compiler/rustc_const_eval/src/interpret/intrinsics.rs index b032ee96ce7..698742fe98c 100644 --- a/compiler/rustc_const_eval/src/interpret/intrinsics.rs +++ b/compiler/rustc_const_eval/src/interpret/intrinsics.rs @@ -62,15 +62,10 @@ crate fn eval_nullary_intrinsic<'tcx>( ensure_monomorphic_enough(tcx, tp_ty)?; ConstValue::from_bool(tp_ty.needs_drop(tcx, param_env)) } - sym::min_align_of | sym::pref_align_of => { + sym::pref_align_of => { // Correctly handles non-monomorphic calls, so there is no need for ensure_monomorphic_enough. let layout = tcx.layout_of(param_env.and(tp_ty)).map_err(|e| err_inval!(Layout(e)))?; - let n = match name { - sym::pref_align_of => layout.align.pref.bytes(), - sym::min_align_of => layout.align.abi.bytes(), - _ => bug!(), - }; - ConstValue::from_machine_usize(n, &tcx) + ConstValue::from_machine_usize(layout.align.pref.bytes(), &tcx) } sym::type_id => { ensure_monomorphic_enough(tcx, tp_ty)?; |
