]>
Commit | Line | Data |
---|---|---|
5869c6ff XL |
1 | warning: any use of this value will cause an error |
2 | --> $DIR/promoted_errors.rs:18:5 | |
3 | | | |
4 | LL | 1 / 0 | |
5 | | ^^^^^ | |
6 | | | | |
7 | | attempt to divide `1_i32` by zero | |
8 | | inside `div_by_zero1` at $DIR/promoted_errors.rs:18:5 | |
9 | | inside `X` at $DIR/promoted_errors.rs:36:29 | |
10 | ... | |
11 | LL | / const X: () = { | |
12 | LL | | let _x: &'static u32 = &overflow(); | |
13 | LL | | | |
14 | LL | | | |
15 | ... | | |
16 | LL | | let _x: &'static i32 = &oob(); | |
17 | LL | | }; | |
18 | | |__- | |
74b04a01 XL |
19 | | |
20 | note: the lint level is defined here | |
21 | --> $DIR/promoted_errors.rs:9:9 | |
22 | | | |
23 | LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)] | |
24 | | ^^^^^^^^^ | |
5869c6ff XL |
25 | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
26 | = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800> | |
27 | ||
28 | warning: any use of this value will cause an error | |
29 | --> $DIR/promoted_errors.rs:36:28 | |
30 | | | |
31 | LL | / const X: () = { | |
32 | LL | | let _x: &'static u32 = &overflow(); | |
33 | LL | | | |
34 | LL | | | |
35 | LL | | let _x: &'static i32 = &div_by_zero1(); | |
36 | | | ^^^^^^^^^^^^^^^ referenced constant has errors | |
37 | ... | | |
38 | LL | | let _x: &'static i32 = &oob(); | |
39 | LL | | }; | |
40 | | |__- | |
41 | | | |
42 | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | |
43 | = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800> | |
44 | ||
45 | warning: 2 warnings emitted | |
ba9703b0 | 46 |