aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Daniel Faria <[email protected]>2020-05-24 21:28:02 +0100
committerPaul Daniel Faria <[email protected]>2020-06-27 15:10:26 +0100
commitb9569886a915f2411adaecbcad28eda8b163c3e3 (patch)
tree291b5a8e121b261fc5c4a3ca3d71feee01befcc9
parent278cbf12cd0f76fc191d5ce7f130e6245596a578 (diff)
Rename Expr::UnsafeBlock to Expr::Unsafe
-rw-r--r--crates/ra_hir_def/src/body/lower.rs2
-rw-r--r--crates/ra_hir_def/src/expr.rs4
-rw-r--r--crates/ra_hir_ty/src/expr.rs2
-rw-r--r--crates/ra_hir_ty/src/infer/expr.rs2
4 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs
index 174bbf9f4..6eb72e950 100644
--- a/crates/ra_hir_def/src/body/lower.rs
+++ b/crates/ra_hir_def/src/body/lower.rs
@@ -220,7 +220,7 @@ impl ExprCollector<'_> {
220 } 220 }
221 ast::Effect::Unsafe(_) => { 221 ast::Effect::Unsafe(_) => {
222 let body = self.collect_block_opt(e.block_expr()); 222 let body = self.collect_block_opt(e.block_expr());
223 self.alloc_expr(Expr::UnsafeBlock { body }, syntax_ptr) 223 self.alloc_expr(Expr::Unsafe { body }, syntax_ptr)
224 } 224 }
225 // FIXME: we need to record these effects somewhere... 225 // FIXME: we need to record these effects somewhere...
226 ast::Effect::Async(_) | ast::Effect::Label(_) => { 226 ast::Effect::Async(_) | ast::Effect::Label(_) => {
diff --git a/crates/ra_hir_def/src/expr.rs b/crates/ra_hir_def/src/expr.rs
index f5e3e74fb..e41cfc16b 100644
--- a/crates/ra_hir_def/src/expr.rs
+++ b/crates/ra_hir_def/src/expr.rs
@@ -150,7 +150,7 @@ pub enum Expr {
150 Tuple { 150 Tuple {
151 exprs: Vec<ExprId>, 151 exprs: Vec<ExprId>,
152 }, 152 },
153 UnsafeBlock { 153 Unsafe {
154 body: ExprId, 154 body: ExprId,
155 }, 155 },
156 Array(Array), 156 Array(Array),
@@ -250,7 +250,7 @@ impl Expr {
250 f(*expr); 250 f(*expr);
251 } 251 }
252 } 252 }
253 Expr::TryBlock { body } | Expr::UnsafeBlock { body } => f(*body), 253 Expr::TryBlock { body } | Expr::Unsafe { body } => f(*body),
254 Expr::Loop { body, .. } => f(*body), 254 Expr::Loop { body, .. } => f(*body),
255 Expr::While { condition, body, .. } => { 255 Expr::While { condition, body, .. } => {
256 f(*condition); 256 f(*condition);
diff --git a/crates/ra_hir_ty/src/expr.rs b/crates/ra_hir_ty/src/expr.rs
index d600aca21..ce73251b8 100644
--- a/crates/ra_hir_ty/src/expr.rs
+++ b/crates/ra_hir_ty/src/expr.rs
@@ -340,7 +340,7 @@ pub fn unsafe_expressions(
340 let expr_scopes = db.expr_scopes(def); 340 let expr_scopes = db.expr_scopes(def);
341 for (id, expr) in body.exprs.iter() { 341 for (id, expr) in body.exprs.iter() {
342 match expr { 342 match expr {
343 Expr::UnsafeBlock { body } => { 343 Expr::Unsafe { body } => {
344 if let Some(scope) = expr_scopes.scope_for(*body) { 344 if let Some(scope) = expr_scopes.scope_for(*body) {
345 unsafe_block_scopes.push(scope); 345 unsafe_block_scopes.push(scope);
346 } 346 }
diff --git a/crates/ra_hir_ty/src/infer/expr.rs b/crates/ra_hir_ty/src/infer/expr.rs
index df7bcb5fa..61af5f064 100644
--- a/crates/ra_hir_ty/src/infer/expr.rs
+++ b/crates/ra_hir_ty/src/infer/expr.rs
@@ -142,7 +142,7 @@ impl<'a> InferenceContext<'a> {
142 // FIXME: Breakable block inference 142 // FIXME: Breakable block inference
143 self.infer_block(statements, *tail, expected) 143 self.infer_block(statements, *tail, expected)
144 } 144 }
145 Expr::UnsafeBlock { body } => self.infer_expr(*body, expected), 145 Expr::Unsafe { body } => self.infer_expr(*body, expected),
146 Expr::TryBlock { body } => { 146 Expr::TryBlock { body } => {
147 let _inner = self.infer_expr(*body, expected); 147 let _inner = self.infer_expr(*body, expected);
148 // FIXME should be std::result::Result<{inner}, _> 148 // FIXME should be std::result::Result<{inner}, _>