rust/tests/ui/nll/user-annotations/constant-in-expr-normalize.rs

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

23 lines
281 B
Rust
Raw Normal View History

2018-10-17 11:31:44 -05:00
trait Mirror {
type Me;
}
impl<T> Mirror for T {
type Me = T;
}
trait Foo<'a> {
const C: <&'a u32 as Mirror>::Me;
}
impl<'a, T> Foo<'a> for T {
const C: &'a u32 = &22;
}
fn foo<'a>(_: &'a u32) -> &'static u32 {
<() as Foo<'a>>::C //~ ERROR
}
fn main() {
}