]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/issue-57201.rs
Merge commit 'dbee13661efa269cb4cd57bb4c6b99a19732b484' into sync_cg_clif-2020-12-27
[rust.git] / src / test / ui / impl-trait / issue-57201.rs
1 // Regression test for #57201
2 // FIXME: The error is temporary hack, we'll revisit here at some point.
3
4 #![feature(impl_trait_in_bindings)]
5 #![allow(incomplete_features)]
6
7 fn bug<'a, 'b, T>()
8 where
9     'a: 'b,
10 {
11     let f: &impl Fn(&'a T) -> &'b T = &|x| x;
12     //~^ ERROR: lifetimes in impl Trait types in bindings are not currently supported
13 }
14
15 fn main() {}