Skip to content

Commit

Permalink
Rollup merge of rust-lang#62578 - JohnTitor:add-test-for-49919, r=ale…
Browse files Browse the repository at this point in the history
…xcrichton

Add test for rust-lang#49919

Closes rust-lang#49919
  • Loading branch information
Centril committed Jul 12, 2019
2 parents d70ea7c + 37942c4 commit 992bcd0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/test/ui/issues/issue-49919.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
fn foo<'a, T: 'a>(t: T) -> Box<dyn Fn() -> &'a T + 'a> {
let foo: Box<dyn for <'c> Fn() -> &'c T> = Box::new(move || &t);
//~^ ERROR: binding for associated type
unimplemented!()
}

fn main() {}
9 changes: 9 additions & 0 deletions src/test/ui/issues/issue-49919.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
error[E0582]: binding for associated type `Output` references lifetime `'c`, which does not appear in the trait input types
--> $DIR/issue-49919.rs:2:39
|
LL | let foo: Box<dyn for <'c> Fn() -> &'c T> = Box::new(move || &t);
| ^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0582`.

0 comments on commit 992bcd0

Please sign in to comment.