diff options
| author | clubby789 <jamie@hill-daniel.co.uk> | 2023-03-14 17:18:26 +0000 |
|---|---|---|
| committer | clubby789 <jamie@hill-daniel.co.uk> | 2023-03-14 17:18:26 +0000 |
| commit | 9afffc5b61d34d09e8f677dbfca8f283fc7fa697 (patch) | |
| tree | ee86d32f7dd6e6762d7aacb99babb3f8d5d115bc /compiler/rustc_passes/src | |
| parent | 669e75163957f8f2408d515ce2da3516cb31f747 (diff) | |
| download | rust-9afffc5b61d34d09e8f677dbfca8f283fc7fa697.tar.gz rust-9afffc5b61d34d09e8f677dbfca8f283fc7fa697.zip | |
Remove box expressions from HIR
Diffstat (limited to 'compiler/rustc_passes/src')
| -rw-r--r-- | compiler/rustc_passes/src/hir_stats.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_passes/src/liveness.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_passes/src/naked_functions.rs | 3 |
3 files changed, 3 insertions, 7 deletions
diff --git a/compiler/rustc_passes/src/hir_stats.rs b/compiler/rustc_passes/src/hir_stats.rs index 3e0d53029ef..47e032758f2 100644 --- a/compiler/rustc_passes/src/hir_stats.rs +++ b/compiler/rustc_passes/src/hir_stats.rs @@ -300,7 +300,7 @@ impl<'v> hir_visit::Visitor<'v> for StatCollector<'v> { record_variants!( (self, e, e.kind, Id::Node(e.hir_id), hir, Expr, ExprKind), [ - Box, ConstBlock, Array, Call, MethodCall, Tup, Binary, Unary, Lit, Cast, Type, + ConstBlock, Array, Call, MethodCall, Tup, Binary, Unary, Lit, Cast, Type, DropTemps, Let, If, Loop, Match, Closure, Block, Assign, AssignOp, Field, Index, Path, AddrOf, Break, Continue, Ret, InlineAsm, Struct, Repeat, Yield, Err ] diff --git a/compiler/rustc_passes/src/liveness.rs b/compiler/rustc_passes/src/liveness.rs index db9d0dcc300..36324e6f8da 100644 --- a/compiler/rustc_passes/src/liveness.rs +++ b/compiler/rustc_passes/src/liveness.rs @@ -473,7 +473,6 @@ impl<'tcx> Visitor<'tcx> for IrMaps<'tcx> { | hir::ExprKind::Struct(..) | hir::ExprKind::Repeat(..) | hir::ExprKind::InlineAsm(..) - | hir::ExprKind::Box(..) | hir::ExprKind::Type(..) | hir::ExprKind::Err(_) | hir::ExprKind::Path(hir::QPath::TypeRelative(..)) @@ -1059,8 +1058,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> { self.propagate_through_expr(&l, r_succ) } - hir::ExprKind::Box(ref e) - | hir::ExprKind::AddrOf(_, _, ref e) + hir::ExprKind::AddrOf(_, _, ref e) | hir::ExprKind::Cast(ref e, _) | hir::ExprKind::Type(ref e, _) | hir::ExprKind::DropTemps(ref e) @@ -1425,7 +1423,6 @@ fn check_expr<'tcx>(this: &mut Liveness<'_, 'tcx>, expr: &'tcx Expr<'tcx>) { | hir::ExprKind::Closure { .. } | hir::ExprKind::Path(_) | hir::ExprKind::Yield(..) - | hir::ExprKind::Box(..) | hir::ExprKind::Type(..) | hir::ExprKind::Err(_) => {} } diff --git a/compiler/rustc_passes/src/naked_functions.rs b/compiler/rustc_passes/src/naked_functions.rs index c5b5cf7f5a9..f07a64c7c3c 100644 --- a/compiler/rustc_passes/src/naked_functions.rs +++ b/compiler/rustc_passes/src/naked_functions.rs @@ -179,8 +179,7 @@ enum ItemKind { impl<'tcx> CheckInlineAssembly<'tcx> { fn check_expr(&mut self, expr: &'tcx hir::Expr<'tcx>, span: Span) { match expr.kind { - ExprKind::Box(..) - | ExprKind::ConstBlock(..) + ExprKind::ConstBlock(..) | ExprKind::Array(..) | ExprKind::Call(..) | ExprKind::MethodCall(..) |
