rust/tests/ui/consts/const-array-oob-arith.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
816 B
Plaintext
Raw Normal View History

2018-08-08 12:28:26 +00:00
error[E0308]: mismatched types
2022-01-19 15:24:49 +00:00
--> $DIR/const-array-oob-arith.rs:5:45
2018-08-08 12:28:26 +00:00
|
2019-03-09 12:03:44 +00:00
LL | const BLUB: [i32; (ARR[0] - 40) as usize] = [5];
| ---------------------- ^^^ expected an array with a size of 2, found one with a size of 1
| |
| help: consider specifying the actual array length: `1`
2018-08-08 12:28:26 +00:00
error[E0308]: mismatched types
2022-01-19 15:24:49 +00:00
--> $DIR/const-array-oob-arith.rs:8:44
2018-08-08 12:28:26 +00:00
|
2019-03-09 12:03:44 +00:00
LL | const BOO: [i32; (ARR[0] - 41) as usize] = [5, 99];
| ---------------------- ^^^^^^^ expected an array with a size of 1, found one with a size of 2
| |
| help: consider specifying the actual array length: `2`
2018-08-08 12:28:26 +00:00
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0308`.