summaryrefslogtreecommitdiffstats
path: root/src/test/ui/impl-trait/printing-binder.rs
blob: 273b5dcdb098545f91f83bf01d7db6a47598fe66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
trait Trait<'a> {}
impl<T> Trait<'_> for T {}
fn whatever() -> impl for<'a> Trait<'a> + for<'b> Trait<'b> {}

fn whatever2() -> impl for<'c> Fn(&'c ()) {
    |_: &()| {}
}

fn main() {
    let x: u32 = whatever();
    //~^ ERROR mismatched types
    let x2: u32 = whatever2();
    //~^ ERROR mismatched types
}