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 mismatched types [E0308] } fn main() {}