1 2 3 4 5 6 7 8 9 10 11
trait Foo { const NAME: &'static str; } impl<'a> Foo for &'a () { const NAME: &'a str = "unit"; //~^ ERROR const not compatible with trait } fn main() {}