Remove box expressions from HIR
This commit is contained in:
parent
669e751639
commit
9afffc5b61
27 changed files with 12 additions and 73 deletions
|
@ -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
|
||||
]
|
||||
|
|
|
@ -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(_) => {}
|
||||
}
|
||||
|
|
|
@ -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(..)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue