dtolnay / syn

Parser for Rust source code
Apache License 2.0
2.81k stars 308 forks source link

Parse struct expressions eagerly within break and return #1656

Closed dtolnay closed 3 months ago

dtolnay commented 3 months ago

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.