summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/in-trait/unconstrained-lt.rs
blob: ff3753de5a2e199faa107a2116e00837964c70ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
trait Foo {
    fn test() -> impl Sized;
}

impl<'a, T> Foo for T {
    //~^ ERROR the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates

    fn test() -> &'a () {
        &()
    }
}

fn main() {}