about summary refs log tree commit diff
path: root/tests/ui/impl-trait/in-trait/unconstrained-lt.rs
blob: 12e0a4263f50339987071c904bbd35a9ea6351c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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 () {
        //~^ WARN: does not match trait method signature
        &()
    }
}

fn main() {}