fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.3 KiB31 linesraw
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
7note: erroneous constant encountered
8  --> $DIR/issue-44578.rs:25:20
9   |
10LL |     println!("{}", <Bar<u16, u8> as Foo>::AMT);
11   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
12
13note: erroneous constant encountered
14  --> $DIR/issue-44578.rs:25:20
15   |
16LL |     println!("{}", <Bar<u16, u8> as Foo>::AMT);
17   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
18   |
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)
20
21note: erroneous constant encountered
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
29error: aborting due to previous error
30
31For more information about this error, try `rustc --explain E0080`.