Skip to content

Commit

Permalink
Add test for issue-54189
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Jun 20, 2019
1 parent 4fb77a0 commit 127edba
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 127edba

Please sign in to comment.