File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
src/test/ui/consts/const-eval Expand file tree Collapse file tree 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
1616LL | println!("{}", 1/(1-1));
1717 | ^^^^^^^
1818
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+
1925warning: attempt to divide by zero
2026 --> $DIR/promoted_errors.rs:11:14
2127 |
@@ -34,6 +40,12 @@ warning: attempt to divide by zero
3440LL | println!("{}", 1/(false as u32));
3541 | ^^^^^^^^^^^^^^^^
3642
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+
3749warning: attempt to divide by zero
3850 --> $DIR/promoted_errors.rs:16:14
3951 |
You can’t perform that action at this time.
0 commit comments