]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/const-eval/promoted_errors.opt.stderr
New upstream version 1.64.0+dfsg1
[rustc.git] / src / test / ui / consts / const-eval / promoted_errors.opt.stderr
CommitLineData
5e7ed085
FG
1warning: this arithmetic operation will overflow
2 --> $DIR/promoted_errors.rs:15:5
3 |
4LL | 0 - 1
5 | ^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
6 |
7note: the lint level is defined here
8 --> $DIR/promoted_errors.rs:11:20
9 |
10LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
11 | ^^^^^^^^^^^^^^^^^^^
12
13warning: this operation will panic at runtime
14 --> $DIR/promoted_errors.rs:21:5
15 |
16LL | 1 / 0
17 | ^^^^^ attempt to divide `1_i32` by zero
18 |
19note: the lint level is defined here
20 --> $DIR/promoted_errors.rs:11:41
21 |
22LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
23 | ^^^^^^^^^^^^^^^^^^^
24
25warning: this operation will panic at runtime
26 --> $DIR/promoted_errors.rs:27:5
27 |
28LL | 1 / (1 - 1)
29 | ^^^^^^^^^^^ attempt to divide `1_i32` by zero
30
31warning: this operation will panic at runtime
32 --> $DIR/promoted_errors.rs:31:5
33 |
34LL | 1 / (false as i32)
35 | ^^^^^^^^^^^^^^^^^^ attempt to divide `1_i32` by zero
36
37warning: this operation will panic at runtime
38 --> $DIR/promoted_errors.rs:35:5
39 |
40LL | [1, 2, 3][4]
41 | ^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 4
42
5869c6ff 43warning: any use of this value will cause an error
5e7ed085 44 --> $DIR/promoted_errors.rs:21:5
5869c6ff 45 |
064997fb
FG
46LL | 1 / 0
47 | ^^^^^
48 | |
49 | attempt to divide `1_i32` by zero
50 | inside `div_by_zero1` at $DIR/promoted_errors.rs:21:5
51 | inside `X` at $DIR/promoted_errors.rs:46:29
5869c6ff 52...
064997fb
FG
53LL | const X: () = {
54 | -----------
74b04a01
XL
55 |
56note: the lint level is defined here
17df50a5 57 --> $DIR/promoted_errors.rs:11:9
74b04a01
XL
58 |
59LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
60 | ^^^^^^^^^
5869c6ff
XL
61 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
62 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
63
64warning: any use of this value will cause an error
5e7ed085 65 --> $DIR/promoted_errors.rs:46:28
5869c6ff 66 |
064997fb
FG
67LL | const X: () = {
68 | -----------
69...
70LL | let _x: &'static i32 = &div_by_zero1();
71 | ^^^^^^^^^^^^^^^ referenced constant has errors
5869c6ff
XL
72 |
73 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
74 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
75
5e7ed085 76warning: 7 warnings emitted
ba9703b0 77
064997fb
FG
78Future incompatibility report: Future breakage diagnostic:
79warning: any use of this value will cause an error
80 --> $DIR/promoted_errors.rs:21:5
81 |
82LL | 1 / 0
83 | ^^^^^
84 | |
85 | attempt to divide `1_i32` by zero
86 | inside `div_by_zero1` at $DIR/promoted_errors.rs:21:5
87 | inside `X` at $DIR/promoted_errors.rs:46:29
88...
89LL | const X: () = {
90 | -----------
91 |
92note: the lint level is defined here
93 --> $DIR/promoted_errors.rs:11:9
94 |
95LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
96 | ^^^^^^^^^
97 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
98 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
99
100Future breakage diagnostic:
101warning: any use of this value will cause an error
102 --> $DIR/promoted_errors.rs:46:28
103 |
104LL | const X: () = {
105 | -----------
106...
107LL | let _x: &'static i32 = &div_by_zero1();
108 | ^^^^^^^^^^^^^^^ referenced constant has errors
109 |
110note: the lint level is defined here
111 --> $DIR/promoted_errors.rs:11:9
112 |
113LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
114 | ^^^^^^^^^
115 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
116 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
117