rust/tests/ui/associated-consts/associated-const-in-trait.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
190 B
Rust
Raw Normal View History

// #29924
trait Trait {
const N: usize;
}
2019-05-28 13:46:13 -05:00
impl dyn Trait {
//~^ ERROR the trait `Trait` cannot be made into an object [E0038]
const fn n() -> usize { Self::N }
}
fn main() {}