diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-12-03 16:13:42 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-12-03 16:13:42 +0000 |
commit | 96b9d5b44ed50160c7a4eb07a31bee5f05b1ecf3 (patch) | |
tree | 74a889d70e201d6997c6baf179261ab3ed8bf23c /crates/ra_hir_ty/src | |
parent | 15f143f0c33cbd382a2ad7a407d9601cb843d164 (diff) | |
parent | 009437f5d9949d2276aa26040e03af0ab328acf3 (diff) |
Merge #2469
2469: Replace `ra_hir_expand::either` with crate r=matklad a=ice1000
As title.
Co-authored-by: ice1000 <[email protected]>
Diffstat (limited to 'crates/ra_hir_ty/src')
-rw-r--r-- | crates/ra_hir_ty/src/expr.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir_ty/src/expr.rs b/crates/ra_hir_ty/src/expr.rs index 5c65f9370..d2bd64e5c 100644 --- a/crates/ra_hir_ty/src/expr.rs +++ b/crates/ra_hir_ty/src/expr.rs | |||
@@ -97,7 +97,7 @@ impl<'a, 'b> ExprValidator<'a, 'b> { | |||
97 | let (_, source_map) = db.body_with_source_map(self.func.into()); | 97 | let (_, source_map) = db.body_with_source_map(self.func.into()); |
98 | 98 | ||
99 | if let Some(source_ptr) = source_map.expr_syntax(id) { | 99 | if let Some(source_ptr) = source_map.expr_syntax(id) { |
100 | if let Some(expr) = source_ptr.value.a() { | 100 | if let Some(expr) = source_ptr.value.left() { |
101 | let root = source_ptr.file_syntax(db); | 101 | let root = source_ptr.file_syntax(db); |
102 | if let ast::Expr::RecordLit(record_lit) = expr.to_node(&root) { | 102 | if let ast::Expr::RecordLit(record_lit) = expr.to_node(&root) { |
103 | if let Some(field_list) = record_lit.record_field_list() { | 103 | if let Some(field_list) = record_lit.record_field_list() { |
@@ -142,7 +142,7 @@ impl<'a, 'b> ExprValidator<'a, 'b> { | |||
142 | let (_, source_map) = db.body_with_source_map(self.func.into()); | 142 | let (_, source_map) = db.body_with_source_map(self.func.into()); |
143 | 143 | ||
144 | if let Some(source_ptr) = source_map.expr_syntax(id) { | 144 | if let Some(source_ptr) = source_map.expr_syntax(id) { |
145 | if let Some(expr) = source_ptr.value.a() { | 145 | if let Some(expr) = source_ptr.value.left() { |
146 | self.sink.push(MissingOkInTailExpr { file: source_ptr.file_id, expr }); | 146 | self.sink.push(MissingOkInTailExpr { file: source_ptr.file_id, expr }); |
147 | } | 147 | } |
148 | } | 148 | } |