summary refs log tree commit diff
path: root/src/test/ui/consts/const-err2.stderr
blob: 1d84d44dc27b3c834400ad29840aae4a0e9d54d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
error: this expression will panic at runtime
  --> $DIR/const-err2.rs:16:13
   |
LL |     let a = -std::i8::MIN;
   |             ^^^^^^^^^^^^^ attempt to negate with overflow
   |
note: lint level defined here
  --> $DIR/const-err2.rs:9:9
   |
LL | #![deny(const_err)]
   |         ^^^^^^^^^

error: this expression will panic at runtime
  --> $DIR/const-err2.rs:18:13
   |
LL |     let b = 200u8 + 200u8 + 200u8;
   |             ^^^^^^^^^^^^^ attempt to add with overflow

error: this expression will panic at runtime
  --> $DIR/const-err2.rs:20:13
   |
LL |     let c = 200u8 * 4;
   |             ^^^^^^^^^ attempt to multiply with overflow

error: this expression will panic at runtime
  --> $DIR/const-err2.rs:22:13
   |
LL |     let d = 42u8 - (42u8 + 1);
   |             ^^^^^^^^^^^^^^^^^ attempt to subtract with overflow

error: index out of bounds: the len is 1 but the index is 1
  --> $DIR/const-err2.rs:24:14
   |
LL |     let _e = [5u8][1];
   |              ^^^^^^^^

error: aborting due to 5 previous errors