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