summary refs log tree commit diff
path: root/src/test/ui/consts/const-array-oob.stderr
blob: 09e4918bf6eed25dae7df9b99583fb8263cb0991 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
error: index out of bounds: the len is 3 but the index is 4
  --> $DIR/const-array-oob.rs:18:19
   |
LL | const BLUB: [u32; FOO[4]] = [5, 6];
   |                   ^^^^^^
   |
   = note: #[deny(const_err)] on by default

error[E0080]: could not evaluate constant expression
  --> $DIR/const-array-oob.rs:18:1
   |
LL | const BLUB: [u32; FOO[4]] = [5, 6];
   | ^^^^^^^^^^^^^^^^^^------^^^^^^^^^^^
   |                   |
   |                   index out of bounds: the len is 3 but the index is 4

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0080`.