Apply suggestions from code review
Co-authored-by: Ralf Jung <post@ralfj.de>
This commit is contained in:
parent
be51e6bd07
commit
6a6767fa2a
1 changed files with 2 additions and 2 deletions
|
|
@ -100,9 +100,9 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
|
|||
|
||||
let num_fields = dest.layout.layout.fields.count();
|
||||
|
||||
if num_fields != 4 && num_fields != 5 {
|
||||
if !(4..=5).contains(&num_fields) {
|
||||
// Always mention 5 fields, since the 4-field struct is only supported
|
||||
// for backwards compatiblity. New code should declare 5 fields
|
||||
// for backwards compatiblity. New code should declare 5 fields.
|
||||
throw_ub_format!("bad declaration of miri_resolve_frame - should return a struct with 5 fields");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue