]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/const-eval/promoted_errors.noopt.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / consts / const-eval / promoted_errors.noopt.stderr
CommitLineData
74b04a01
XL
1warning: this arithmetic operation will overflow
2 --> $DIR/promoted_errors.rs:12:20
3 |
4LL | println!("{}", 0u32 - 1);
1b1a35ee 5 | ^^^^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
74b04a01
XL
6 |
7note: the lint level is defined here
8 --> $DIR/promoted_errors.rs:9:20
9 |
10LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
11 | ^^^^^^^^^^^^^^^^^^^
12
13warning: this arithmetic operation will overflow
14 --> $DIR/promoted_errors.rs:14:14
15 |
16LL | let _x = 0u32 - 1;
1b1a35ee 17 | ^^^^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow
74b04a01
XL
18
19warning: this operation will panic at runtime
20 --> $DIR/promoted_errors.rs:16:20
21 |
22LL | println!("{}", 1 / (1 - 1));
1b1a35ee 23 | ^^^^^^^^^^^ attempt to divide `1_i32` by zero
74b04a01
XL
24 |
25note: the lint level is defined here
26 --> $DIR/promoted_errors.rs:9:41
27 |
28LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
29 | ^^^^^^^^^^^^^^^^^^^
30
31warning: reaching this expression at runtime will panic or abort
32 --> $DIR/promoted_errors.rs:16:20
33 |
34LL | println!("{}", 1 / (1 - 1));
35 | ^^^^^^^^^^^ dividing by zero
36 |
37note: the lint level is defined here
38 --> $DIR/promoted_errors.rs:9:9
39 |
40LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
41 | ^^^^^^^^^
42
43warning: erroneous constant used
44 --> $DIR/promoted_errors.rs:16:20
45 |
46LL | println!("{}", 1 / (1 - 1));
47 | ^^^^^^^^^^^ referenced constant has errors
48
49warning: this operation will panic at runtime
50 --> $DIR/promoted_errors.rs:20:14
51 |
52LL | let _x = 1 / (1 - 1);
1b1a35ee 53 | ^^^^^^^^^^^ attempt to divide `1_i32` by zero
74b04a01
XL
54
55warning: this operation will panic at runtime
56 --> $DIR/promoted_errors.rs:22:20
57 |
58LL | println!("{}", 1 / (false as u32));
1b1a35ee 59 | ^^^^^^^^^^^^^^^^^^ attempt to divide `1_u32` by zero
74b04a01
XL
60
61warning: reaching this expression at runtime will panic or abort
62 --> $DIR/promoted_errors.rs:22:20
63 |
64LL | println!("{}", 1 / (false as u32));
65 | ^^^^^^^^^^^^^^^^^^ dividing by zero
66
67warning: erroneous constant used
68 --> $DIR/promoted_errors.rs:22:20
69 |
70LL | println!("{}", 1 / (false as u32));
71 | ^^^^^^^^^^^^^^^^^^ referenced constant has errors
72
73warning: this operation will panic at runtime
74 --> $DIR/promoted_errors.rs:26:14
75 |
76LL | let _x = 1 / (false as u32);
1b1a35ee 77 | ^^^^^^^^^^^^^^^^^^ attempt to divide `1_u32` by zero
74b04a01 78
ba9703b0
XL
79warning: 10 warnings emitted
80