diff --git a/src/librustc/hir/lowering.rs b/src/librustc/hir/lowering.rs index 1ada058a8bc..8a39f412aaa 100644 --- a/src/librustc/hir/lowering.rs +++ b/src/librustc/hir/lowering.rs @@ -4483,16 +4483,6 @@ impl<'a> LoweringContext<'a> { } } - fn field(&mut self, ident: Ident, expr: P, span: Span) -> hir::Field { - hir::Field { - hir_id: self.next_id(), - ident, - span, - expr, - is_shorthand: false, - } - } - fn stmt(&mut self, span: Span, node: hir::StmtKind) -> hir::Stmt { hir::Stmt { span, node, hir_id: self.next_id() } } diff --git a/src/librustc/hir/lowering/expr.rs b/src/librustc/hir/lowering/expr.rs index a1c8af8c80d..57e7feaedc7 100644 --- a/src/librustc/hir/lowering/expr.rs +++ b/src/librustc/hir/lowering/expr.rs @@ -1350,4 +1350,14 @@ impl LoweringContext<'_> { attrs, } } + + fn field(&mut self, ident: Ident, expr: P, span: Span) -> hir::Field { + hir::Field { + hir_id: self.next_id(), + ident, + span, + expr, + is_shorthand: false, + } + } }