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 21:00:29 +01:00
|
|
|
| ^^^ expected `2usize`, found `1usize`
|
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 21:00:29 +01:00
|
|
|
| ^^^^^^^ expected `1usize`, found `2usize`
|
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`.
|