Skip to content

Commit c04a13c

Browse files
committed
Simplify
1 parent f85fc28 commit c04a13c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crates/hir-def/src/body/lower.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,9 +1083,9 @@ impl ExprCollector<'_> {
10831083
.collect(),
10841084
}
10851085
}
1086-
// FIXME: rustfmt removes this label if it is a block and not a loop
1087-
ast::Pat::LiteralPat(lit) => 'b: loop {
1088-
break if let Some(ast_lit) = lit.literal() {
1086+
#[rustfmt::skip] // https://github.com/rust-lang/rustfmt/issues/5676
1087+
ast::Pat::LiteralPat(lit) => 'b: {
1088+
if let Some(ast_lit) = lit.literal() {
10891089
let mut hir_lit: Literal = ast_lit.kind().into();
10901090
if lit.minus_token().is_some() {
10911091
let Some(h) = hir_lit.negate() else {
@@ -1099,7 +1099,7 @@ impl ExprCollector<'_> {
10991099
Pat::Lit(expr_id)
11001100
} else {
11011101
Pat::Missing
1102-
};
1102+
}
11031103
},
11041104
ast::Pat::RestPat(_) => {
11051105
// `RestPat` requires special handling and should not be mapped

0 commit comments

Comments
 (0)