diff options
Diffstat (limited to 'crates/ra_hir_ty/src/diagnostics.rs')
-rw-r--r-- | crates/ra_hir_ty/src/diagnostics.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_hir_ty/src/diagnostics.rs b/crates/ra_hir_ty/src/diagnostics.rs index 885abbaf2..f210c305a 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,12 +80,12 @@ 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 | ||