X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_ast_lowering%2Fsrc%2Fitem.rs;h=d73d6d3918ea618dde2c3bbaa77e0954c73f5627;hb=b23419b03da767954ad0fb92ac3be729417cf381;hp=9eda48e93294bb8f496cdf859e27b8d51051950c;hpb=4f527a55dea64aeb420357154884b6ca6d350986;p=rust.git diff --git a/compiler/rustc_ast_lowering/src/item.rs b/compiler/rustc_ast_lowering/src/item.rs index 9eda48e9329..d73d6d3918e 100644 --- a/compiler/rustc_ast_lowering/src/item.rs +++ b/compiler/rustc_ast_lowering/src/item.rs @@ -796,7 +796,7 @@ fn lower_trait_item_ref(&mut self, i: &AssocItem) -> hir::TraitItemRef { /// Construct `ExprKind::Err` for the given `span`. pub(crate) fn expr_err(&mut self, span: Span) -> hir::Expr<'hir> { - self.expr(span, hir::ExprKind::Err, AttrVec::new()) + self.expr(span, hir::ExprKind::Err) } fn lower_impl_item(&mut self, i: &AssocItem) -> &'hir hir::ImplItem<'hir> { @@ -1151,11 +1151,8 @@ fn lower_maybe_async_body( // Transform into `drop-temps { }`, an expression: let desugared_span = this.mark_span_with_reason(DesugaringKind::Async, user_body.span, None); - let user_body = this.expr_drop_temps( - desugared_span, - this.arena.alloc(user_body), - AttrVec::new(), - ); + let user_body = + this.expr_drop_temps(desugared_span, this.arena.alloc(user_body)); // As noted above, create the final block like // @@ -1172,14 +1169,11 @@ fn lower_maybe_async_body( Some(user_body), ); - this.expr_block(body, AttrVec::new()) + this.expr_block(body) }, ); - ( - this.arena.alloc_from_iter(parameters), - this.expr(body.span, async_expr, AttrVec::new()), - ) + (this.arena.alloc_from_iter(parameters), this.expr(body.span, async_expr)) }) }