Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
fn main() { | ||
[(); &(&'static: loop { |x| {}; }) as *const _ as usize] | ||
//~^ ERROR: invalid label name `'static` | ||
//~| ERROR: type annotations needed | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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`. |