summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/const-eval/issue-44578.stderr
blob: 963381b587093b1d4b69a8eb806d70ddbe639a5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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

error[E0080]: evaluation of constant value failed
  --> $DIR/issue-44578.rs:25:20
   |
LL |     println!("{}", <Bar<u16, u8> as Foo>::AMT);
   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors

error[E0080]: erroneous constant used
  --> $DIR/issue-44578.rs:25:20
   |
LL |     println!("{}", <Bar<u16, u8> as Foo>::AMT);
   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
   |
   = note: this error 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)

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0080`.