lowering: move lower_field -> expr.rs

This commit is contained in:
Mazdak Farrokhzad
2019-08-10 17:26:11 +02:00
parent 94876c22db
commit e71f6e1fbc
2 changed files with 10 additions and 10 deletions
-10
View File
@@ -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),
+10
View File
@@ -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) => {},