|
| 1 | +error: attempt to subtract with overflow |
| 2 | + --> $DIR/promoted_errors2.rs:6:20 |
| 3 | + | |
| 4 | +LL | println!("{}", 0u32 - 1); |
| 5 | + | ^^^^^^^^ |
| 6 | + | |
| 7 | +note: lint level defined here |
| 8 | + --> $DIR/promoted_errors2.rs:3:9 |
| 9 | + | |
| 10 | +LL | #![deny(const_err)] |
| 11 | + | ^^^^^^^^^ |
| 12 | + |
| 13 | +error: attempt to subtract with overflow |
| 14 | + --> $DIR/promoted_errors2.rs:8:14 |
| 15 | + | |
| 16 | +LL | let _x = 0u32 - 1; |
| 17 | + | ^^^^^^^^ |
| 18 | + |
| 19 | +error: attempt to divide by zero |
| 20 | + --> $DIR/promoted_errors2.rs:10:20 |
| 21 | + | |
| 22 | +LL | println!("{}", 1/(1-1)); |
| 23 | + | ^^^^^^^ |
| 24 | + |
| 25 | +error: reaching this expression at runtime will panic or abort |
| 26 | + --> $DIR/promoted_errors2.rs:10:20 |
| 27 | + | |
| 28 | +LL | println!("{}", 1/(1-1)); |
| 29 | + | ^^^^^^^ attempt to divide by zero |
| 30 | + |
| 31 | +error: attempt to divide by zero |
| 32 | + --> $DIR/promoted_errors2.rs:13:14 |
| 33 | + | |
| 34 | +LL | let _x = 1/(1-1); |
| 35 | + | ^^^^^^^ |
| 36 | + |
| 37 | +error: this expression will panic at runtime |
| 38 | + --> $DIR/promoted_errors2.rs:13:14 |
| 39 | + | |
| 40 | +LL | let _x = 1/(1-1); |
| 41 | + | ^^^^^^^ attempt to divide by zero |
| 42 | + |
| 43 | +error: attempt to divide by zero |
| 44 | + --> $DIR/promoted_errors2.rs:16:20 |
| 45 | + | |
| 46 | +LL | println!("{}", 1/(false as u32)); |
| 47 | + | ^^^^^^^^^^^^^^^^ |
| 48 | + |
| 49 | +error: reaching this expression at runtime will panic or abort |
| 50 | + --> $DIR/promoted_errors2.rs:16:20 |
| 51 | + | |
| 52 | +LL | println!("{}", 1/(false as u32)); |
| 53 | + | ^^^^^^^^^^^^^^^^ attempt to divide by zero |
| 54 | + |
| 55 | +error: attempt to divide by zero |
| 56 | + --> $DIR/promoted_errors2.rs:19:14 |
| 57 | + | |
| 58 | +LL | let _x = 1/(false as u32); |
| 59 | + | ^^^^^^^^^^^^^^^^ |
| 60 | + |
| 61 | +error: this expression will panic at runtime |
| 62 | + --> $DIR/promoted_errors2.rs:19:14 |
| 63 | + | |
| 64 | +LL | let _x = 1/(false as u32); |
| 65 | + | ^^^^^^^^^^^^^^^^ attempt to divide by zero |
| 66 | + |
| 67 | +error: aborting due to 10 previous errors |
| 68 | + |
0 commit comments