dtolnay / syn

Parser for Rust source code
Apache License 2.0
2.78k stars 306 forks source link

Parenthesize break values containing leading label #1692

Closed dtolnay closed 1 month ago

dtolnay commented 1 month ago

Previously, it was possible for ExprBreak's ToTokens impl to produce break 'inner: loop { break 'inner 1 } + 1 which is not valid Rust syntax.

Same bug in rustc: https://github.com/rust-lang/rust/pull/126883