diff options
Diffstat (limited to 'crates/ra_hir_ty/src/diagnostics')
-rw-r--r-- | crates/ra_hir_ty/src/diagnostics/expr.rs | 5 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/diagnostics/match_check.rs | 8 |
2 files changed, 8 insertions, 5 deletions
diff --git a/crates/ra_hir_ty/src/diagnostics/expr.rs b/crates/ra_hir_ty/src/diagnostics/expr.rs index 3c37fc58e..98959ab68 100644 --- a/crates/ra_hir_ty/src/diagnostics/expr.rs +++ b/crates/ra_hir_ty/src/diagnostics/expr.rs | |||
@@ -110,8 +110,8 @@ impl<'a, 'b> ExprValidator<'a, 'b> { | |||
110 | self.sink.push(MissingFields { | 110 | self.sink.push(MissingFields { |
111 | file: source_ptr.file_id, | 111 | file: source_ptr.file_id, |
112 | field_list: AstPtr::new(&field_list), | 112 | field_list: AstPtr::new(&field_list), |
113 | field_list_parent_path: record_lit.path().map(|path| AstPtr::new(&path)), | ||
113 | missed_fields, | 114 | missed_fields, |
114 | list_parent_path: record_lit.path().map(|path| AstPtr::new(&path)), | ||
115 | }) | 115 | }) |
116 | } | 116 | } |
117 | } | 117 | } |
@@ -141,6 +141,9 @@ impl<'a, 'b> ExprValidator<'a, 'b> { | |||
141 | self.sink.push(MissingPatFields { | 141 | self.sink.push(MissingPatFields { |
142 | file: source_ptr.file_id, | 142 | file: source_ptr.file_id, |
143 | field_list: AstPtr::new(&field_list), | 143 | field_list: AstPtr::new(&field_list), |
144 | field_list_parent_path: record_pat | ||
145 | .path() | ||
146 | .map(|path| AstPtr::new(&path)), | ||
144 | missed_fields, | 147 | missed_fields, |
145 | }) | 148 | }) |
146 | } | 149 | } |
diff --git a/crates/ra_hir_ty/src/diagnostics/match_check.rs b/crates/ra_hir_ty/src/diagnostics/match_check.rs index 507edcb7d..deca244db 100644 --- a/crates/ra_hir_ty/src/diagnostics/match_check.rs +++ b/crates/ra_hir_ty/src/diagnostics/match_check.rs | |||
@@ -1161,15 +1161,15 @@ fn main() { | |||
1161 | //^ Missing match arm | 1161 | //^ Missing match arm |
1162 | match a { | 1162 | match a { |
1163 | Either::A { } => (), | 1163 | Either::A { } => (), |
1164 | //^^^ Missing structure fields: | 1164 | //^^^^^^^^^ Missing structure fields: |
1165 | // | - foo | 1165 | // | - foo |
1166 | Either::B => (), | 1166 | Either::B => (), |
1167 | } | 1167 | } |
1168 | match a { | 1168 | match a { |
1169 | //^ Missing match arm | 1169 | //^ Missing match arm |
1170 | Either::A { } => (), | 1170 | Either::A { } => (), |
1171 | } //^^^ Missing structure fields: | 1171 | } //^^^^^^^^^ Missing structure fields: |
1172 | // | - foo | 1172 | // | - foo |
1173 | 1173 | ||
1174 | match a { | 1174 | match a { |
1175 | Either::A { foo: true } => (), | 1175 | Either::A { foo: true } => (), |