Add test for issue-57201
This commit is contained in:
parent
fc8be08a8e
commit
437c07f662
|
@ -0,0 +1,14 @@
|
|||
// Regression test for #57201
|
||||
|
||||
#![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() {}
|
|
@ -0,0 +1,8 @@
|
|||
error: lifetimes in impl Trait types in bindings are not currently supported
|
||||
--> $DIR/issue-57201.rs:10:13
|
||||
|
|
||||
LL | let f: &impl Fn(&'a T) -> &'b T = &|x| x;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
Loading…
Reference in New Issue