Closed
Description
The following code (from #29924)
trait Trait {
const N: usize;
}
impl Trait {
}
Doesn't compile because of the following error:
error[E0038]: the trait `Trait` cannot be made into an object
--> src/main.rs:5:6
|
5 | impl Trait {
| ^^^^^ the trait `Trait` cannot be made into an object
|
= note: the trait cannot contain associated consts like `N`
I couldn't find anywhere why a trait cannot contain associated consts, so I suggest to update the error index with a short explaination: https://doc.rust-lang.org/error-index.html#E0038