summary refs log tree commit diff
path: root/src/test/ui/const-eval-overflow-4.stderr
blob: 058c8730d7c9e23422da03814d608204a1d1e96d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
error: attempt to add with overflow
  --> $DIR/const-eval-overflow-4.rs:24:13
   |
LL |     : [u32; (i8::MAX as i8 + 1i8) as usize]
   |             ^^^^^^^^^^^^^^^^^^^^^
   |
   = note: #[deny(const_err)] on by default

error[E0080]: could not evaluate constant expression
  --> $DIR/const-eval-overflow-4.rs:22:1
   |
LL | / const A_I8_T
LL | |     //~^ ERROR could not evaluate constant expression
LL | |     : [u32; (i8::MAX as i8 + 1i8) as usize]
   | |             --------------------- attempt to add with overflow
LL | |     //~^ ERROR attempt to add with overflow
LL | |     = [0; (i8::MAX as usize) + 1];
   | |__________________________________^

error: aborting due to 2 previous errors

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