diff options
| author | Michael Goulet <michael@errs.io> | 2024-11-23 05:02:18 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-11-24 03:32:11 +0000 |
| commit | 28970a2cb0885ba7922820d6fb0e14c7e166df9b (patch) | |
| tree | 4757a2157d38d05b941d4854f82ac9dc28974274 /tests/ui/consts/const-array-oob-arith.rs | |
| parent | e48241b5d15da7491d3c8fd4d87f7a183a15b6b4 (diff) | |
| download | rust-28970a2cb0885ba7922820d6fb0e14c7e166df9b.tar.gz rust-28970a2cb0885ba7922820d6fb0e14c7e166df9b.zip | |
Simplify array length mismatch error reporting
Diffstat (limited to 'tests/ui/consts/const-array-oob-arith.rs')
| -rw-r--r-- | tests/ui/consts/const-array-oob-arith.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ui/consts/const-array-oob-arith.rs b/tests/ui/consts/const-array-oob-arith.rs index 9332cbbd4d7..0f6e76768cd 100644 --- a/tests/ui/consts/const-array-oob-arith.rs +++ b/tests/ui/consts/const-array-oob-arith.rs @@ -4,10 +4,10 @@ const VAL: i32 = ARR[IDX]; const BONG: [i32; (ARR[0] - 41) as usize] = [5]; const BLUB: [i32; (ARR[0] - 40) as usize] = [5]; //~^ ERROR: mismatched types -//~| expected an array with a fixed size of 2 elements, found one with 1 element +//~| expected an array const BOO: [i32; (ARR[0] - 41) as usize] = [5, 99]; //~^ ERROR: mismatched types -//~| expected an array with a fixed size of 1 element, found one with 2 elements +//~| expected an array fn main() { let _ = VAL; |
