File tree 1 file changed +12
-0
lines changed
src/test/ui/consts/const-eval
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,12 @@ warning: attempt to divide by zero
16
16
LL | println!("{}", 1/(1-1));
17
17
| ^^^^^^^
18
18
19
+ warning: this expression will panic at runtime
20
+ --> $DIR/promoted_errors.rs:9:20
21
+ |
22
+ LL | println!("{}", 1/(1-1));
23
+ | ^^^^^^^ attempt to divide by zero
24
+
19
25
warning: attempt to divide by zero
20
26
--> $DIR/promoted_errors.rs:11:14
21
27
|
@@ -34,6 +40,12 @@ warning: attempt to divide by zero
34
40
LL | println!("{}", 1/(false as u32));
35
41
| ^^^^^^^^^^^^^^^^
36
42
43
+ warning: this expression will panic at runtime
44
+ --> $DIR/promoted_errors.rs:14:20
45
+ |
46
+ LL | println!("{}", 1/(false as u32));
47
+ | ^^^^^^^^^^^^^^^^ attempt to divide by zero
48
+
37
49
warning: attempt to divide by zero
38
50
--> $DIR/promoted_errors.rs:16:14
39
51
|
You can’t perform that action at this time.
0 commit comments