]> git.proxmox.com Git - rustc.git/blob - src/test/ui/associated-item/issue-48027.stderr
New upstream version 1.43.0+dfsg1
[rustc.git] / src / test / ui / associated-item / issue-48027.stderr
1 error[E0038]: the trait `Bar` cannot be made into an object
2 --> $DIR/issue-48027.rs:6:6
3 |
4 LL | trait Bar {
5 | --- this trait cannot be made into an object...
6 LL | const X: usize;
7 | - ...because it contains this associated `const`
8 ...
9 LL | impl dyn Bar {}
10 | ^^^^^^^ the trait `Bar` cannot be made into an object
11 |
12 = help: consider moving `X` to another trait
13
14 error[E0283]: type annotations needed
15 --> $DIR/issue-48027.rs:3:32
16 |
17 LL | const X: usize;
18 | --------------- required by `Bar::X`
19 LL | fn return_n(&self) -> [u8; Bar::X];
20 | ^^^^^^
21 | |
22 | cannot infer type
23 | help: use the fully qualified path to an implementation: `<Type as Bar>::X`
24 |
25 = note: cannot resolve `_: Bar`
26 = note: associated constants cannot be accessed directly on a `trait`, they can only be accessed through a specific `impl`
27
28 error: aborting due to 2 previous errors
29
30 Some errors have detailed explanations: E0038, E0283.
31 For more information about an error, try `rustc --explain E0038`.