about summary refs log tree commit diff
path: root/tests/ui/impl-trait/precise-capturing/rpitit-impl-captures-too-much.rs
blob: 115cab1cb99299f377dc27e0c3019ec9e3f6818e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
struct Invariant<'a>(&'a mut &'a mut ());

trait Trait {
    fn hello(self_: Invariant<'_>) -> impl Sized + use<Self>;
}

impl Trait for () {
    fn hello(self_: Invariant<'_>) -> impl Sized + use<'_> {}
    //~^ ERROR return type captures more lifetimes than trait definition
}

fn main() {}