diff options
author | Dmitry <[email protected]> | 2020-08-09 14:35:51 +0100 |
---|---|---|
committer | Dmitry <[email protected]> | 2020-08-09 14:39:32 +0100 |
commit | 8068302fefc75440b823f4bf1731a5f347d7c767 (patch) | |
tree | 251b967182e79bc82a58c2fb208c688f6152df1f /crates/ra_hir_ty/src/diagnostics.rs | |
parent | 1a43a0f63e0008787225abb6fb2baef97b6a39e0 (diff) | |
parent | 8a57afe5a4bfab40072a83f7dc4ca560bf860919 (diff) |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'crates/ra_hir_ty/src/diagnostics.rs')
-rw-r--r-- | crates/ra_hir_ty/src/diagnostics.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/crates/ra_hir_ty/src/diagnostics.rs b/crates/ra_hir_ty/src/diagnostics.rs index 885abbaf2..977c0525b 100644 --- a/crates/ra_hir_ty/src/diagnostics.rs +++ b/crates/ra_hir_ty/src/diagnostics.rs | |||
@@ -29,7 +29,7 @@ pub fn validate_body(db: &dyn HirDatabase, owner: DefWithBodyId, sink: &mut Diag | |||
29 | #[derive(Debug)] | 29 | #[derive(Debug)] |
30 | pub struct NoSuchField { | 30 | pub struct NoSuchField { |
31 | pub file: HirFileId, | 31 | pub file: HirFileId, |
32 | pub field: AstPtr<ast::RecordField>, | 32 | pub field: AstPtr<ast::RecordExprField>, |
33 | } | 33 | } |
34 | 34 | ||
35 | impl Diagnostic for NoSuchField { | 35 | impl Diagnostic for NoSuchField { |
@@ -47,19 +47,19 @@ impl Diagnostic for NoSuchField { | |||
47 | } | 47 | } |
48 | 48 | ||
49 | impl AstDiagnostic for NoSuchField { | 49 | impl AstDiagnostic for NoSuchField { |
50 | type AST = ast::RecordField; | 50 | type AST = ast::RecordExprField; |
51 | 51 | ||
52 | fn ast(&self, db: &dyn AstDatabase) -> Self::AST { | 52 | fn ast(&self, db: &dyn AstDatabase) -> Self::AST { |
53 | let root = db.parse_or_expand(self.source().file_id).unwrap(); | 53 | let root = db.parse_or_expand(self.source().file_id).unwrap(); |
54 | let node = self.source().value.to_node(&root); | 54 | let node = self.source().value.to_node(&root); |
55 | ast::RecordField::cast(node).unwrap() | 55 | ast::RecordExprField::cast(node).unwrap() |
56 | } | 56 | } |
57 | } | 57 | } |
58 | 58 | ||
59 | #[derive(Debug)] | 59 | #[derive(Debug)] |
60 | pub struct MissingFields { | 60 | pub struct MissingFields { |
61 | pub file: HirFileId, | 61 | pub file: HirFileId, |
62 | pub field_list: AstPtr<ast::RecordFieldList>, | 62 | pub field_list: AstPtr<ast::RecordExprFieldList>, |
63 | pub missed_fields: Vec<Name>, | 63 | pub missed_fields: Vec<Name>, |
64 | } | 64 | } |
65 | 65 | ||
@@ -80,19 +80,19 @@ impl Diagnostic for MissingFields { | |||
80 | } | 80 | } |
81 | 81 | ||
82 | impl AstDiagnostic for MissingFields { | 82 | impl AstDiagnostic for MissingFields { |
83 | type AST = ast::RecordFieldList; | 83 | type AST = ast::RecordExprFieldList; |
84 | 84 | ||
85 | fn ast(&self, db: &dyn AstDatabase) -> Self::AST { | 85 | fn ast(&self, db: &dyn AstDatabase) -> Self::AST { |
86 | let root = db.parse_or_expand(self.source().file_id).unwrap(); | 86 | let root = db.parse_or_expand(self.source().file_id).unwrap(); |
87 | let node = self.source().value.to_node(&root); | 87 | let node = self.source().value.to_node(&root); |
88 | ast::RecordFieldList::cast(node).unwrap() | 88 | ast::RecordExprFieldList::cast(node).unwrap() |
89 | } | 89 | } |
90 | } | 90 | } |
91 | 91 | ||
92 | #[derive(Debug)] | 92 | #[derive(Debug)] |
93 | pub struct MissingPatFields { | 93 | pub struct MissingPatFields { |
94 | pub file: HirFileId, | 94 | pub file: HirFileId, |
95 | pub field_list: AstPtr<ast::RecordFieldPatList>, | 95 | pub field_list: AstPtr<ast::RecordPatFieldList>, |
96 | pub missed_fields: Vec<Name>, | 96 | pub missed_fields: Vec<Name>, |
97 | } | 97 | } |
98 | 98 | ||