summary refs log tree commit diff
path: root/src/test/ui/impl-trait/issue-57201.rs
blob: c1a98d8897bfbd075373d1ddfad1ae2fa86a95a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Regression test for #57201
// FIXME: The error is temporary hack, we'll revisit here at some point.

#![feature(impl_trait_in_bindings)]
#![allow(incomplete_features)]

fn bug<'a, 'b, T>()
where
    'a: 'b,
{
    let f: &impl Fn(&'a T) -> &'b T = &|x| x;
    //~^ ERROR: lifetimes in impl Trait types in bindings are not currently supported
}

fn main() {}