Skip to content

Bad span for labeled loops #27042

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
marcusklaas opened this issue Jul 14, 2015 · 0 comments · Fixed by #27065
Closed

Bad span for labeled loops #27042

marcusklaas opened this issue Jul 14, 2015 · 0 comments · Fixed by #27065
Labels
A-parser Area: The lexing & parsing of Rust source code to an AST E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@marcusklaas
Copy link
Contributor

Rustc's parser does not include a loop's label in its span.

So the span associated to the expression

'somelabel: loop {
    whatev();
}

will contain only

loop {
    whatev();
}

cc @nrc

@nrc nrc added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. A-parser Area: The lexing & parsing of Rust source code to an AST labels Jul 14, 2015
bors added a commit that referenced this issue Jul 20, 2015
This closes #27042.

I'd love to know if there's a way to make a regression test for this!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-parser Area: The lexing & parsing of Rust source code to an AST E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants