We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8aeaba commit e86c2baCopy full SHA for e86c2ba
src/matches.rs
@@ -306,8 +306,9 @@ fn block_can_be_flattened<'a>(
306
expr: &'a ast::Expr,
307
) -> Option<&'a ast::Block> {
308
match expr.kind {
309
- ast::ExprKind::Block(ref block, _)
310
- if !is_unsafe_block(block)
+ ast::ExprKind::Block(ref block, label)
+ if label.is_none()
311
+ && !is_unsafe_block(block)
312
&& !context.inside_macro()
313
&& is_simple_block(context, block, Some(&expr.attrs))
314
&& !stmt_is_expr_mac(&block.stmts[0]) =>
tests/target/issue_5676.rs
@@ -0,0 +1,8 @@
1
+fn main() {
2
+ match true {
3
+ true => 'a: {
4
+ break 'a;
5
+ }
6
+ _ => (),
7
8
+}
0 commit comments