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.

16 lines
638 B
Plaintext
Raw Normal View History

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