Skip to content

Commit

Permalink
Rollup merge of #62000 - JohnTitor:add-test-issue-54189, r=cramertj
Browse files Browse the repository at this point in the history
Add test for issue-54189

Closes #54189
  • Loading branch information
Centril committed Jun 20, 2019
2 parents 7e9ecfa + 127edba commit 9e5ace6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/test/ui/issues/issue-54189.rs
Original file line number Diff line number Diff line change
@@ -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 changes: 9 additions & 0 deletions src/test/ui/issues/issue-54189.stderr
Original file line number Diff line number Diff line change
@@ -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`.

0 comments on commit 9e5ace6

Please sign in to comment.