Skip to content

Commit 9e5ace6

Browse files
authored
Rollup merge of #62000 - JohnTitor:add-test-issue-54189, r=cramertj
Add test for issue-54189 Closes #54189
2 parents 7e9ecfa + 127edba commit 9e5ace6

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/test/ui/issues/issue-54189.rs

+6
Original file line numberDiff line numberDiff line change
@@ -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

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
error[E0582]: binding for associated type `Output` references lifetime `'r`, which does not appear in the trait input types
2+
--> $DIR/issue-54189.rs:1:35
3+
|
4+
LL | fn bug() -> impl for <'r> Fn() -> &'r () { || { &() } }
5+
| ^^^^^^
6+
7+
error: aborting due to previous error
8+
9+
For more information about this error, try `rustc --explain E0582`.

0 commit comments

Comments
 (0)