From e71f6e1fbcb41572b72ea266cce53a14e8be432b Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Sat, 10 Aug 2019 17:26:11 +0200 Subject: [PATCH] lowering: move lower_field -> expr.rs --- src/librustc/hir/lowering.rs | 10 ---------- src/librustc/hir/lowering/expr.rs | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/librustc/hir/lowering.rs b/src/librustc/hir/lowering.rs index e93a81d74fdc..d1b3f15c708a 100644 --- a/src/librustc/hir/lowering.rs +++ b/src/librustc/hir/lowering.rs @@ -3124,16 +3124,6 @@ fn lower_struct_field(&mut self, (index, f): (usize, &StructField)) -> hir::Stru } } - fn lower_field(&mut self, f: &Field) -> hir::Field { - hir::Field { - hir_id: self.next_id(), - ident: f.ident, - expr: P(self.lower_expr(&f.expr)), - span: f.span, - is_shorthand: f.is_shorthand, - } - } - fn lower_mt(&mut self, mt: &MutTy, itctx: ImplTraitContext<'_>) -> hir::MutTy { hir::MutTy { ty: self.lower_ty(&mt.ty, itctx), diff --git a/src/librustc/hir/lowering/expr.rs b/src/librustc/hir/lowering/expr.rs index 0092616cc397..5533432d13d2 100644 --- a/src/librustc/hir/lowering/expr.rs +++ b/src/librustc/hir/lowering/expr.rs @@ -818,6 +818,16 @@ fn lower_expr_asm(&mut self, asm: &InlineAsm) -> hir::ExprKind { hir::ExprKind::InlineAsm(P(hir_asm), outputs, inputs) } + fn lower_field(&mut self, f: &Field) -> hir::Field { + hir::Field { + hir_id: self.next_id(), + ident: f.ident, + expr: P(self.lower_expr(&f.expr)), + span: f.span, + is_shorthand: f.is_shorthand, + } + } + fn lower_expr_yield(&mut self, span: Span, opt_expr: Option<&Expr>) -> hir::ExprKind { match self.generator_kind { Some(hir::GeneratorKind::Gen) => {},