fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

1.41.1
1.3 KiB50 linesraw
1error: this expression will panic at runtime
2  --> $DIR/promoted_errors.rs:7:14
3   |
4LL |     let _x = 0u32 - 1;
5   |              ^^^^^^^^ attempt to subtract with overflow
6   |
7note: lint level defined here
8  --> $DIR/promoted_errors.rs:3:9
9   |
10LL | #![deny(const_err)]
11   |         ^^^^^^^^^
12
13error: attempt to divide by zero
14  --> $DIR/promoted_errors.rs:9:20
15   |
16LL |     println!("{}", 1/(1-1));
17   |                    ^^^^^^^
18
19error: reaching this expression at runtime will panic or abort
20  --> $DIR/promoted_errors.rs:9:20
21   |
22LL |     println!("{}", 1/(1-1));
23   |                    ^^^^^^^ dividing by zero
24
25error: attempt to divide by zero
26  --> $DIR/promoted_errors.rs:12:14
27   |
28LL |     let _x = 1/(1-1);
29   |              ^^^^^^^
30
31error: attempt to divide by zero
32  --> $DIR/promoted_errors.rs:14:20
33   |
34LL |     println!("{}", 1/(false as u32));
35   |                    ^^^^^^^^^^^^^^^^
36
37error: reaching this expression at runtime will panic or abort
38  --> $DIR/promoted_errors.rs:14:20
39   |
40LL |     println!("{}", 1/(false as u32));
41   |                    ^^^^^^^^^^^^^^^^ dividing by zero
42
43error: attempt to divide by zero
44  --> $DIR/promoted_errors.rs:17:14
45   |
46LL |     let _x = 1/(false as u32);
47   |              ^^^^^^^^^^^^^^^^
48
49error: aborting due to 7 previous errors
50