blob: 6b17346e6ecd1456f65c34ece14b1d3e522b834a [file] [log] [blame]
warning: any use of this value will cause an error
--> $DIR/promoted_errors.rs:20:5
|
LL | 1 / 0
| ^^^^^
| |
| attempt to divide `1_i32` by zero
| inside `div_by_zero1` at $DIR/promoted_errors.rs:20:5
| inside `X` at $DIR/promoted_errors.rs:41:29
...
LL | / const X: () = {
LL | | let _x: &'static u32 = &overflow();
LL | |
LL | |
... |
LL | | let _x: &'static i32 = &oob();
LL | | };
| |__-
|
note: the lint level is defined here
--> $DIR/promoted_errors.rs:11:9
|
LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
| ^^^^^^^^^
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
warning: any use of this value will cause an error
--> $DIR/promoted_errors.rs:41:28
|
LL | / const X: () = {
LL | | let _x: &'static u32 = &overflow();
LL | |
LL | |
LL | | let _x: &'static i32 = &div_by_zero1();
| | ^^^^^^^^^^^^^^^ referenced constant has errors
... |
LL | | let _x: &'static i32 = &oob();
LL | | };
| |__-
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
warning: 2 warnings emitted