properly fill a promoted's required_consts

then we can also make all_required_consts_are_checked a constant instead of a function
This commit is contained in:
Ralf Jung
2024-03-21 13:53:00 +01:00
parent bf021ea625
commit 173d1bd36b
13 changed files with 121 additions and 54 deletions

View File

@@ -142,7 +142,7 @@ pub trait Machine<'mir, 'tcx: 'mir>: Sized {
/// Determines whether `eval_mir_constant` can never fail because all required consts have
/// already been checked before.
fn all_required_consts_are_checked(ecx: &InterpCx<'mir, 'tcx, Self>) -> bool;
const ALL_CONSTS_ARE_PRECHECKED: bool = true;
/// Whether memory accesses should be alignment-checked.
fn enforce_alignment(ecx: &InterpCx<'mir, 'tcx, Self>) -> bool;