Skip to content

Commit 182f5f3

Browse files
Aaron1011RalfJung
andauthored
Apply suggestions from code review
Co-authored-by: Ralf Jung <[email protected]>
1 parent be51e6b commit 182f5f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/shims/backtrace.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
100100

101101
let num_fields = dest.layout.layout.fields.count();
102102

103-
if num_fields != 4 && num_fields != 5 {
103+
if !(4..=5).contains(num_fields) {
104104
// Always mention 5 fields, since the 4-field struct is only supported
105-
// for backwards compatiblity. New code should declare 5 fields
105+
// for backwards compatiblity. New code should declare 5 fields.
106106
throw_ub_format!("bad declaration of miri_resolve_frame - should return a struct with 5 fields");
107107
}
108108

0 commit comments

Comments
 (0)