We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc8be08 commit 437c07fCopy full SHA for 437c07f
src/test/ui/impl-trait/issue-57201.rs
@@ -0,0 +1,14 @@
1
+// Regression test for #57201
2
+
3
+#![feature(impl_trait_in_bindings)]
4
+#![allow(incomplete_features)]
5
6
+fn bug<'a, 'b, T>()
7
+where
8
+ 'a: 'b,
9
+{
10
+ let f: &impl Fn(&'a T) -> &'b T = &|x| x;
11
+ //~^ ERROR: lifetimes in impl Trait types in bindings are not currently supported
12
+}
13
14
+fn main() {}
src/test/ui/impl-trait/issue-57201.stderr
@@ -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
0 commit comments