2018-08-26 13:19:34 +00:00
|
|
|
warning: any use of this value will cause an error
|
2019-12-14 03:28:32 +00:00
|
|
|
--> $DIR/conditional_array_execution.rs:7:19
|
2018-01-25 13:15:12 +00:00
|
|
|
|
|
2018-03-06 11:43:02 +00:00
|
|
|
LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
|
2019-03-11 00:28:52 +00:00
|
|
|
| ------------------^^^^^---------------------------
|
2018-06-27 11:36:30 +00:00
|
|
|
| |
|
2020-09-15 19:34:50 +00:00
|
|
|
| attempt to compute `5_u32 - 6_u32`, which would overflow
|
2018-03-06 11:43:02 +00:00
|
|
|
|
|
2020-01-22 23:57:38 +00:00
|
|
|
note: the lint level is defined here
|
2019-12-14 03:28:32 +00:00
|
|
|
--> $DIR/conditional_array_execution.rs:3:9
|
2018-05-11 12:33:37 +00:00
|
|
|
|
|
|
|
|
LL | #![warn(const_err)]
|
|
|
|
| ^^^^^^^^^
|
2021-01-30 13:49:22 +00:00
|
|
|
= 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>
|
2018-01-25 13:15:12 +00:00
|
|
|
|
2021-01-24 11:50:30 +00:00
|
|
|
error[E0080]: evaluation of constant value failed
|
2021-01-30 13:49:22 +00:00
|
|
|
--> $DIR/conditional_array_execution.rs:12:20
|
2018-06-03 00:04:20 +00:00
|
|
|
|
|
|
|
|
LL | println!("{}", FOO);
|
|
|
|
| ^^^ referenced constant has errors
|
|
|
|
|
2020-01-08 20:31:08 +00:00
|
|
|
warning: erroneous constant used
|
2021-01-30 13:49:22 +00:00
|
|
|
--> $DIR/conditional_array_execution.rs:12:20
|
2019-11-22 20:26:09 +00:00
|
|
|
|
|
|
|
|
LL | println!("{}", FOO);
|
|
|
|
| ^^^ referenced constant has errors
|
2021-01-30 13:49:22 +00:00
|
|
|
|
|
|
|
|
= 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>
|
2021-10-21 14:01:16 +00:00
|
|
|
= note: this warning originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2019-11-22 20:26:09 +00:00
|
|
|
|
2020-03-11 15:30:09 +00:00
|
|
|
error: aborting due to previous error; 2 warnings emitted
|
2018-06-03 00:04:20 +00:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0080`.
|