Skip to content

Commit

Permalink
Add test for issue-52437
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Oct 22, 2019
1 parent dd0f98b commit 93fab98
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/test/ui/closures/issue-52437.rs
@@ -0,0 +1,5 @@
fn main() {
[(); &(&'static: loop { |x| {}; }) as *const _ as usize]
//~^ ERROR: invalid label name `'static`
//~| ERROR: type annotations needed
}
15 changes: 15 additions & 0 deletions src/test/ui/closures/issue-52437.stderr
@@ -0,0 +1,15 @@
error: invalid label name `'static`
--> $DIR/issue-52437.rs:2:13
|
LL | [(); &(&'static: loop { |x| {}; }) as *const _ as usize]
| ^^^^^^^

error[E0282]: type annotations needed
--> $DIR/issue-52437.rs:2:30
|
LL | [(); &(&'static: loop { |x| {}; }) as *const _ as usize]
| ^ consider giving this closure parameter a type

error: aborting due to 2 previous errors

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

0 comments on commit 93fab98

Please sign in to comment.