From 8c078a01641518a6b093922d4b1d27d1a98bad08 Mon Sep 17 00:00:00 2001 From: uHOOCCOOHu Date: Wed, 11 Sep 2019 23:53:41 +0800 Subject: Infer box expression --- crates/ra_hir/src/expr.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'crates/ra_hir/src/expr.rs') diff --git a/crates/ra_hir/src/expr.rs b/crates/ra_hir/src/expr.rs index 698fa671b..b1bec2a68 100644 --- a/crates/ra_hir/src/expr.rs +++ b/crates/ra_hir/src/expr.rs @@ -237,6 +237,9 @@ pub enum Expr { expr: ExprId, mutability: Mutability, }, + Box { + expr: ExprId, + }, UnaryOp { expr: ExprId, op: UnaryOp, @@ -413,7 +416,8 @@ impl Expr { | Expr::Try { expr } | Expr::Cast { expr, .. } | Expr::Ref { expr, .. } - | Expr::UnaryOp { expr, .. } => { + | Expr::UnaryOp { expr, .. } + | Expr::Box { expr } => { f(*expr); } Expr::Tuple { exprs } => { -- cgit v1.2.3