We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dd0f98b commit 93fab98Copy full SHA for 93fab98
src/test/ui/closures/issue-52437.rs
@@ -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
+}
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]
+ | ^^^^^^^
6
+
7
+error[E0282]: type annotations needed
8
+ --> $DIR/issue-52437.rs:2:30
9
10
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