Rollup merge of #62000 - JohnTitor:add-test-issue-54189, r=cramertj
Add test for issue-54189 Closes #54189
This commit is contained in:
commit
9e5ace6f43
2 changed files with 15 additions and 0 deletions
6
src/test/ui/issues/issue-54189.rs
Normal file
6
src/test/ui/issues/issue-54189.rs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
fn bug() -> impl for <'r> Fn() -> &'r () { || { &() } }
|
||||
//~^ ERROR binding for associated type `Output` references lifetime `'r`
|
||||
|
||||
fn main() {
|
||||
let f = bug();
|
||||
}
|
||||
9
src/test/ui/issues/issue-54189.stderr
Normal file
9
src/test/ui/issues/issue-54189.stderr
Normal file
|
|
@ -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 () { || { &() } }
|
||||
| ^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0582`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue