]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-err2.stderr
Rollup merge of #64174 - GuillaumeGomez:missing-iterator-examples, r=sfackler
[rust.git] / src / test / ui / consts / const-err2.stderr
1 error: this expression will panic at runtime
2   --> $DIR/const-err2.rs:16:13
3    |
4 LL |     let a = -std::i8::MIN;
5    |             ^^^^^^^^^^^^^ attempt to negate with overflow
6    |
7 note: lint level defined here
8   --> $DIR/const-err2.rs:9:9
9    |
10 LL | #![deny(const_err)]
11    |         ^^^^^^^^^
12
13 error: this expression will panic at runtime
14   --> $DIR/const-err2.rs:18:13
15    |
16 LL |     let b = 200u8 + 200u8 + 200u8;
17    |             ^^^^^^^^^^^^^ attempt to add with overflow
18
19 error: this expression will panic at runtime
20   --> $DIR/const-err2.rs:20:13
21    |
22 LL |     let c = 200u8 * 4;
23    |             ^^^^^^^^^ attempt to multiply with overflow
24
25 error: this expression will panic at runtime
26   --> $DIR/const-err2.rs:22:13
27    |
28 LL |     let d = 42u8 - (42u8 + 1);
29    |             ^^^^^^^^^^^^^^^^^ attempt to subtract with overflow
30
31 error: index out of bounds: the len is 1 but the index is 1
32   --> $DIR/const-err2.rs:24:14
33    |
34 LL |     let _e = [5u8][1];
35    |              ^^^^^^^^
36
37 error: aborting due to 5 previous errors
38