Skip to content

Commit 93fab98

Browse files
committedOct 22, 2019
Add test for issue-52437
1 parent dd0f98b commit 93fab98

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
 

‎src/test/ui/closures/issue-52437.rs

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
fn main() {
2+
[(); &(&'static: loop { |x| {}; }) as *const _ as usize]
3+
//~^ ERROR: invalid label name `'static`
4+
//~| ERROR: type annotations needed
5+
}
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
error: invalid label name `'static`
2+
--> $DIR/issue-52437.rs:2:13
3+
|
4+
LL | [(); &(&'static: loop { |x| {}; }) as *const _ as usize]
5+
| ^^^^^^^
6+
7+
error[E0282]: type annotations needed
8+
--> $DIR/issue-52437.rs:2:30
9+
|
10+
LL | [(); &(&'static: loop { |x| {}; }) as *const _ as usize]
11+
| ^ consider giving this closure parameter a type
12+
13+
error: aborting due to 2 previous errors
14+
15+
For more information about this error, try `rustc --explain E0282`.

0 commit comments

Comments
 (0)
Please sign in to comment.