2022-09-21 06:05:20 -05:00
error[E0080]: evaluation of `<Bar<u16, u8> as Foo>::AMT` failed
--> $DIR/issue-44578.rs:13:24
|
LL | const AMT: usize = [A::AMT][(A::AMT > B::AMT) as usize];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ index out of bounds: the length is 1 but the index is 1
2023-09-11 16:09:11 -05:00
note: erroneous constant encountered
2022-09-21 06:05:20 -05:00
--> $DIR/issue-44578.rs:25:20
2018-04-08 15:26:28 -05:00
|
2018-06-02 19:04:20 -05:00
LL | println!("{}", <Bar<u16, u8> as Foo>::AMT);
2022-11-15 05:06:20 -06:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-04-08 15:26:28 -05:00
2024-02-16 23:14:46 -06:00
note: erroneous constant encountered
--> $DIR/issue-44578.rs:25:20
|
LL | println!("{}", <Bar<u16, u8> as Foo>::AMT);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
2023-09-11 16:09:11 -05:00
note: erroneous constant encountered
2022-09-21 06:05:20 -05:00
--> $DIR/issue-44578.rs:25:20
2022-06-04 10:06:04 -05:00
|
LL | println!("{}", <Bar<u16, u8> as Foo>::AMT);
2022-11-15 05:06:20 -06:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
2022-06-04 10:06:04 -05:00
|
2022-11-15 05:06:20 -06:00
= note: this note 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-09-21 06:05:20 -05:00
2023-09-11 16:09:11 -05:00
note: erroneous constant encountered
2022-11-15 05:06:20 -06:00
--> $DIR/issue-44578.rs:25:20
|
LL | println!("{}", <Bar<u16, u8> as Foo>::AMT);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2023-10-04 13:34:50 -05:00
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
2022-11-15 05:06:20 -06:00
= note: this note 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)
2023-11-21 09:44:16 -06:00
error: aborting due to 1 previous error
2022-06-04 10:06:04 -05:00
2022-09-21 06:05:20 -05:00
For more information about this error, try `rustc --explain E0080`.