summary refs log tree commit diff
path: root/src/test/ui/consts/const-array-oob.stderr
blob: 19ec9a4aa1745745edcb36ce6c38fb0e559f802d (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:13
   |
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`.