error[E0038]: the trait `Trait` cannot be made into an object --> $DIR/associated-const-in-trait.rs:9:6 | LL | const N: usize; | - the trait cannot contain associated consts like `N` ... LL | impl dyn Trait { | ^^^^^^^^^ the trait `Trait` cannot be made into an object error: aborting due to previous error For more information about this error, try `rustc --explain E0038`.