1 2 3 4 5 6 7 8 9 10 11 12
struct Foo<'a> { x: &'a u32 } impl<'a> Foo<'a> { const C: &'a u32 = &22; } fn foo<'a>(_: &'a u32) -> &'static u32 { <Foo<'a>>::C //~ ERROR } fn main() { }