Skip to content
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

Parse struct expressions eagerly within break and return #1656

Merged
merged 1 commit into from
May 15, 2024
Merged

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented May 15, 2024

In both while break S {} {} and while return S {} {}, the value broken/returned is parsed as S {} by rustc, not just S. In other words whether or not allow_struct is true outside of the break/return expression, inside it's treated as true regardless.

@dtolnay dtolnay merged commit e7a4d7f into master May 15, 2024
29 checks passed
@dtolnay dtolnay deleted the breakreturn branch May 15, 2024 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant