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 af0c44c commit fc8be08Copy full SHA for fc8be08
src/test/ui/impl-trait/issue-57200.rs
@@ -0,0 +1,14 @@
1
+// Regression test for #57200
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-57200.stderr
@@ -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
0 commit comments