]> git.proxmox.com Git - rustc.git/blame - tests/ui/consts/const-eval/issue-44578.stderr
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / consts / const-eval / issue-44578.stderr
CommitLineData
2b03887a
FG
1error[E0080]: evaluation of `<Bar<u16, u8> as Foo>::AMT` failed
2 --> $DIR/issue-44578.rs:13:24
3 |
4LL | 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
6
487cf647 7note: erroneous constant used
2b03887a 8 --> $DIR/issue-44578.rs:25:20
0531ce1d 9 |
94b46f34 10LL | println!("{}", <Bar<u16, u8> as Foo>::AMT);
487cf647 11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
0531ce1d 12
487cf647 13note: erroneous constant used
2b03887a 14 --> $DIR/issue-44578.rs:25:20
064997fb
FG
15 |
16LL | println!("{}", <Bar<u16, u8> as Foo>::AMT);
487cf647 17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
064997fb 18 |
487cf647 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)
2b03887a 20
487cf647
FG
21note: erroneous constant used
22 --> $DIR/issue-44578.rs:25:20
23 |
24LL | println!("{}", <Bar<u16, u8> as Foo>::AMT);
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
26 |
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)
28
29note: erroneous constant used
30 --> $DIR/issue-44578.rs:25:20
31 |
32LL | println!("{}", <Bar<u16, u8> as Foo>::AMT);
33 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
34 |
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)
36
37error: aborting due to previous error
064997fb 38
2b03887a 39For more information about this error, try `rustc --explain E0080`.