mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-30 13:06:28 +03:00
Simplify
This commit is contained in:
@@ -1083,9 +1083,9 @@ fn collect_pat_(&mut self, pat: ast::Pat, binding_list: &mut BindingList) -> Pat
|
||||
.collect(),
|
||||
}
|
||||
}
|
||||
// FIXME: rustfmt removes this label if it is a block and not a loop
|
||||
ast::Pat::LiteralPat(lit) => 'b: loop {
|
||||
break if let Some(ast_lit) = lit.literal() {
|
||||
#[rustfmt::skip] // https://github.com/rust-lang/rustfmt/issues/5676
|
||||
ast::Pat::LiteralPat(lit) => 'b: {
|
||||
if let Some(ast_lit) = lit.literal() {
|
||||
let mut hir_lit: Literal = ast_lit.kind().into();
|
||||
if lit.minus_token().is_some() {
|
||||
let Some(h) = hir_lit.negate() else {
|
||||
@@ -1099,7 +1099,7 @@ fn collect_pat_(&mut self, pat: ast::Pat, binding_list: &mut BindingList) -> Pat
|
||||
Pat::Lit(expr_id)
|
||||
} else {
|
||||
Pat::Missing
|
||||
};
|
||||
}
|
||||
},
|
||||
ast::Pat::RestPat(_) => {
|
||||
// `RestPat` requires special handling and should not be mapped
|
||||
|
||||
Reference in New Issue
Block a user