rust/tests/ui/nll/user-annotations/constant-in-expr-trait-item-3.rs

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

15 lines
179 B
Rust
Raw Normal View History

trait Foo<'a> {
const C: &'a u32;
}
impl<'a, T> Foo<'a> for T {
const C: &'a u32 = &22;
}
fn foo<'a, T: Foo<'a>>() -> &'static u32 {
T::C //~ ERROR
}
fn main() {
}