Add test for issue-57200
This commit is contained in:
parent
af0c44cb29
commit
fc8be08a8e
2 changed files with 22 additions and 0 deletions
14
src/test/ui/impl-trait/issue-57200.rs
Normal file
14
src/test/ui/impl-trait/issue-57200.rs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
// Regression test for #57200
|
||||
|
||||
#![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() {}
|
||||
8
src/test/ui/impl-trait/issue-57200.stderr
Normal file
8
src/test/ui/impl-trait/issue-57200.stderr
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
error: lifetimes in impl Trait types in bindings are not currently supported
|
||||
--> $DIR/issue-57200.rs:10:12
|
||||
|
|
||||
LL | let f: impl Fn(&'a T) -> &'b T = |x| x;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue