summaryrefslogtreecommitdiffstats
path: root/tests/ui/nll/user-annotations/ascribed-type-wf.rs
blob: 5db02c46ec36954a251626317b150f7f490c2096 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Regression test for #101350.
// check-fail

trait Trait {
    type Ty;
}

impl Trait for &'static () {
    type Ty = ();
}

fn extend<'a>() {
    None::<<&'a () as Trait>::Ty>;
    //~^ ERROR lifetime may not live long enough
}

fn main() {}