fork/rust
git clone https://git.julia.blue/fork/rust
b8cedc00407
1.42.0
1error[E0038]: the trait `Bar` cannot be made into an object 2 --> $DIR/issue-48027.rs:6:6 3 | 4LL | const X: usize; 5 | - the trait cannot contain associated consts like `X` 6... 7LL | impl dyn Bar {} 8 | ^^^^^^^ the trait `Bar` cannot be made into an object 9 10error[E0283]: type annotations needed 11 --> $DIR/issue-48027.rs:3:32 12 | 13LL | const X: usize; 14 | --------------- required by `Bar::X` 15LL | fn return_n(&self) -> [u8; Bar::X]; 16 | ^^^^^^ 17 | | 18 | cannot infer type 19 | help: use the fully qualified path to an implementation: `<Type as Bar>::X` 20 | 21 = note: cannot resolve `_: Bar` 22 = note: associated constants cannot be accessed directly on a `trait`, they can only be accessed through a specific `impl` 23 24error: aborting due to 2 previous errors 25 26Some errors have detailed explanations: E0038, E0283. 27For more information about an error, try `rustc --explain E0038`.