]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-58022.stderr
Rollup merge of #87307 - michaelwoerister:pgo-unwind-msvc, r=nagisa
[rust.git] / src / test / ui / issues / issue-58022.stderr
1 error[E0423]: expected function, tuple struct or tuple variant, found trait `Foo`
2   --> $DIR/issue-58022.rs:14:9
3    |
4 LL |         Foo(Box::new(*slice))
5    |         ^^^ not a function, tuple struct or tuple variant
6
7 error[E0283]: type annotations needed
8   --> $DIR/issue-58022.rs:4:25
9    |
10 LL |     fn new(slice: &[u8; Foo::SIZE]) -> Self;
11    |                         ^^^^^^^^^
12    |                         |
13    |                         cannot infer type
14    |                         help: use the fully qualified path to an implementation: `<Type as Foo>::SIZE`
15    |
16    = note: cannot satisfy `_: Foo`
17    = note: associated constants cannot be accessed directly on a `trait`, they can only be accessed through a specific `impl`
18 note: required by `Foo::SIZE`
19   --> $DIR/issue-58022.rs:2:5
20    |
21 LL |     const SIZE: usize;
22    |     ^^^^^^^^^^^^^^^^^^
23
24 error: aborting due to 2 previous errors
25
26 Some errors have detailed explanations: E0283, E0423.
27 For more information about an error, try `rustc --explain E0283`.