mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-17 05:25:37 +03:00
lowering: move lower_field -> expr.rs
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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) => {},
|
||||
|
||||
Reference in New Issue
Block a user