]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/const-eval/promoted_errors.opt.stderr
New upstream version 1.54.0+dfsg1
[rustc.git] / src / test / ui / consts / const-eval / promoted_errors.opt.stderr
CommitLineData
5869c6ff 1warning: any use of this value will cause an error
17df50a5 2 --> $DIR/promoted_errors.rs:20:5
5869c6ff
XL
3 |
4LL | 1 / 0
5 | ^^^^^
6 | |
7 | attempt to divide `1_i32` by zero
17df50a5
XL
8 | inside `div_by_zero1` at $DIR/promoted_errors.rs:20:5
9 | inside `X` at $DIR/promoted_errors.rs:41:29
5869c6ff
XL
10...
11LL | / const X: () = {
12LL | | let _x: &'static u32 = &overflow();
13LL | |
14LL | |
15... |
16LL | | let _x: &'static i32 = &oob();
17LL | | };
18 | |__-
74b04a01
XL
19 |
20note: the lint level is defined here
17df50a5 21 --> $DIR/promoted_errors.rs:11:9
74b04a01
XL
22 |
23LL | #![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
28warning: any use of this value will cause an error
17df50a5 29 --> $DIR/promoted_errors.rs:41:28
5869c6ff
XL
30 |
31LL | / const X: () = {
32LL | | let _x: &'static u32 = &overflow();
33LL | |
34LL | |
35LL | | let _x: &'static i32 = &div_by_zero1();
36 | | ^^^^^^^^^^^^^^^ referenced constant has errors
37... |
38LL | | let _x: &'static i32 = &oob();
39LL | | };
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
45warning: 2 warnings emitted
ba9703b0 46