]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-eval/promoted_errors.stderr
a4c1c48a03dfe30f1a5a5f6f3076b9e7ccd884a8
[rust.git] / src / test / ui / const-eval / promoted_errors.stderr
1 warning: this expression will panic at runtime
2   --> $DIR/promoted_errors.rs:17:14
3    |
4 LL |     let _x = 0u32 - 1;
5    |              ^^^^^^^^ attempt to subtract with overflow
6    |
7 note: lint level defined here
8   --> $DIR/promoted_errors.rs:11:9
9    |
10 LL | #![warn(const_err)]
11    |         ^^^^^^^^^
12
13 warning: attempt to divide by zero
14   --> $DIR/promoted_errors.rs:19:20
15    |
16 LL |     println!("{}", 1/(1-1));
17    |                    ^^^^^^^
18
19 warning: this expression will panic at runtime
20   --> $DIR/promoted_errors.rs:19:20
21    |
22 LL |     println!("{}", 1/(1-1));
23    |                    ^^^^^^^ attempt to divide by zero
24
25 warning: attempt to divide by zero
26   --> $DIR/promoted_errors.rs:22:14
27    |
28 LL |     let _x = 1/(1-1);
29    |              ^^^^^^^
30
31 warning: this expression will panic at runtime
32   --> $DIR/promoted_errors.rs:22:14
33    |
34 LL |     let _x = 1/(1-1);
35    |              ^^^^^^^ attempt to divide by zero
36
37 warning: this expression will panic at runtime
38   --> $DIR/promoted_errors.rs:25:20
39    |
40 LL |     println!("{}", 1/(false as u32));
41    |                    ^^^^^^^^^^^^^^^^ attempt to divide by zero
42