Files
rust/src/test/ui/consts/const-array-oob-arith.stderr

22 lines
794 B
Plaintext
Raw Normal View History

2018-08-08 14:28:26 +02:00
error[E0308]: mismatched types
2018-12-25 08:56:47 -07:00
--> $DIR/const-array-oob-arith.rs:7: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 elements
2018-08-08 14:28:26 +02:00
|
= note: expected type `[i32; 2]`
found type `[i32; 1]`
error[E0308]: mismatched types
2018-12-25 08:56:47 -07: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 elements, found one with 2 elements
2018-08-08 14:28:26 +02:00
|
= note: expected type `[i32; 1]`
found type `[i32; 2]`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0308`.