1 error[E0080]: evaluation of `<Bar<u16, u8> as Foo>::AMT` failed
2 --> $DIR/issue-44578.rs:13:24
4 LL | const AMT: usize = [A::AMT][(A::AMT > B::AMT) as usize];
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ index out of bounds: the length is 1 but the index is 1
7 note: erroneous constant used
8 --> $DIR/issue-44578.rs:25:20
10 LL | println!("{}", <Bar<u16, u8> as Foo>::AMT);
11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
13 note: erroneous constant used
14 --> $DIR/issue-44578.rs:25:20
16 LL | println!("{}", <Bar<u16, u8> as Foo>::AMT);
17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
19 = 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)
21 note: erroneous constant used
22 --> $DIR/issue-44578.rs:25:20
24 LL | println!("{}", <Bar<u16, u8> as Foo>::AMT);
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
27 = 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)
29 note: erroneous constant used
30 --> $DIR/issue-44578.rs:25:20
32 LL | println!("{}", <Bar<u16, u8> as Foo>::AMT);
33 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
35 = 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)
37 error: aborting due to previous error
39 For more information about this error, try `rustc --explain E0080`.