diff options
| author | Ralf Jung <post@ralfj.de> | 2023-07-24 11:44:58 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-07-25 14:30:58 +0200 |
| commit | a2bcafa500fa407fa77716ab78b353b7d7daac5d (patch) | |
| tree | 58e593f4394ea240723c4b6aa69a84b2e6ac437a /compiler/rustc_abi/src/lib.rs | |
| parent | a593de4fab309968d305f9c6812c2203d4431464 (diff) | |
| download | rust-a2bcafa500fa407fa77716ab78b353b7d7daac5d.tar.gz rust-a2bcafa500fa407fa77716ab78b353b7d7daac5d.zip | |
interpret: refactor projection code to work on a common trait, and use that for visitors
Diffstat (limited to 'compiler/rustc_abi/src/lib.rs')
| -rw-r--r-- | compiler/rustc_abi/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_abi/src/lib.rs b/compiler/rustc_abi/src/lib.rs index ef0c763ac20..0fc1da27b8f 100644 --- a/compiler/rustc_abi/src/lib.rs +++ b/compiler/rustc_abi/src/lib.rs @@ -1189,7 +1189,7 @@ impl FieldsShape { } FieldsShape::Array { stride, count } => { let i = u64::try_from(i).unwrap(); - assert!(i < count); + assert!(i < count, "tried to access field {} of array with {} fields", i, count); stride * i } FieldsShape::Arbitrary { ref offsets, .. } => offsets[FieldIdx::from_usize(i)], |
