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

22 lines
892 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];
2019-05-25 20:42:14 +01:00
| ^^^ expected `Const { ty: usize, val: Scalar(0x0000000000000002) }`, found `Const { ty: usize, val: Scalar(0x0000000000000001) }`
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];
2019-05-25 20:42:14 +01:00
| ^^^^^^^ expected `Const { ty: usize, val: Scalar(0x0000000000000001) }`, found `Const { ty: usize, val: Scalar(0x0000000000000002) }`
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`.