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.
2 parents 7e9ecfa + 127edba commit 9e5ace6Copy full SHA for 9e5ace6
src/test/ui/issues/issue-54189.rs
@@ -0,0 +1,6 @@
1
+fn bug() -> impl for <'r> Fn() -> &'r () { || { &() } }
2
+//~^ ERROR binding for associated type `Output` references lifetime `'r`
3
+
4
+fn main() {
5
+ let f = bug();
6
+}
src/test/ui/issues/issue-54189.stderr
@@ -0,0 +1,9 @@
+error[E0582]: binding for associated type `Output` references lifetime `'r`, which does not appear in the trait input types
+ --> $DIR/issue-54189.rs:1:35
+ |
+LL | fn bug() -> impl for <'r> Fn() -> &'r () { || { &() } }
+ | ^^^^^^
7
+error: aborting due to previous error
8
9
+For more information about this error, try `rustc --explain E0582`.
0 commit comments