1
Fork 0

Remove hir::Arm::attrs.

This commit is contained in:
Camille GILLOT 2020-11-26 23:46:48 +01:00
parent a987bbb97c
commit 96788df68c
5 changed files with 23 additions and 25 deletions

View file

@ -618,14 +618,8 @@ impl<'hir> LoweringContext<'_, 'hir> {
}
});
let hir_id = self.next_id();
hir::Arm {
hir_id,
attrs: self.lower_attrs(hir_id, &arm.attrs),
pat,
guard,
body: self.lower_expr(&arm.body),
span: arm.span,
}
self.lower_attrs(hir_id, &arm.attrs);
hir::Arm { hir_id, pat, guard, body: self.lower_expr(&arm.body), span: arm.span }
}
/// Lower an `async` construct to a generator that is then wrapped so it implements `Future`.
@ -2169,13 +2163,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
}
fn arm(&mut self, pat: &'hir hir::Pat<'hir>, expr: &'hir hir::Expr<'hir>) -> hir::Arm<'hir> {
hir::Arm {
hir_id: self.next_id(),
attrs: &[],
pat,
guard: None,
span: expr.span,
body: expr,
}
hir::Arm { hir_id: self.next_id(), pat, guard: None, span: expr.span, body: expr }
}
}