lowering: move field -> expr.rs

This commit is contained in:
Mazdak Farrokhzad 2019-08-10 17:40:35 +02:00
parent 29e9b5ddd4
commit 93570b02bd
2 changed files with 10 additions and 10 deletions

View File

@ -4483,16 +4483,6 @@ impl<'a> LoweringContext<'a> {
}
}
fn field(&mut self, ident: Ident, expr: P<hir::Expr>, 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() }
}

View File

@ -1350,4 +1350,14 @@ impl LoweringContext<'_> {
attrs,
}
}
fn field(&mut self, ident: Ident, expr: P<hir::Expr>, span: Span) -> hir::Field {
hir::Field {
hir_id: self.next_id(),
ident,
span,
expr,
is_shorthand: false,
}
}
}