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];
2022-02-13 15:27:59 +00:00
| -------------- ^^^^^ attempt to compute `5_u32 - 6_u32`, which would overflow
2018-03-06 11:43:02 +00:00
|
2022-09-18 15:55:36 +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>
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)]
| ^^^^^^^^^
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>
2022-06-21 02:25:52 +00:00
= note: this warning originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (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`.
2022-06-04 15:06:04 +00:00
Future incompatibility report: Future breakage diagnostic:
warning: any use of this value will cause an error
--> $DIR/conditional_array_execution.rs:7:19
|
LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
2022-02-13 15:27:59 +00:00
| -------------- ^^^^^ attempt to compute `5_u32 - 6_u32`, which would overflow
2022-06-04 15:06:04 +00:00
|
2022-09-18 15:55:36 +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>
2022-06-04 15:06:04 +00:00
note: the lint level is defined here
--> $DIR/conditional_array_execution.rs:3:9
|
LL | #![warn(const_err)]
| ^^^^^^^^^
Future breakage diagnostic:
warning: erroneous constant used
--> $DIR/conditional_array_execution.rs:12:20
|
LL | println!("{}", FOO);
| ^^^ referenced constant has errors
|
2022-09-18 15:55:36 +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>
2022-06-04 15:06:04 +00:00
note: the lint level is defined here
--> $DIR/conditional_array_execution.rs:3:9
|
LL | #![warn(const_err)]
| ^^^^^^^^^
2022-06-21 02:25:52 +00:00
= note: this warning originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
2022-06-04 15:06:04 +00:00