about summary refs log tree commit diff
path: root/tests/ui/impl-trait/in-bindings/escaping-bound-var.rs
blob: b57fef9be21c236d88d89caa7a57e0f726f06cfa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#![feature(impl_trait_in_bindings)]

trait Foo<'a> {
    type Out;
}

impl<'a> Foo<'a> for () {
    type Out = ();
}

fn main() {
    let x: &dyn for<'a> Foo<'a, Out = impl Sized + 'a> = &();
    //~^ ERROR cannot capture late-bound lifetime in `impl Trait` in binding
}