aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/diagnostics.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-30 15:21:30 +0100
committerAleksey Kladov <[email protected]>2020-07-30 15:21:30 +0100
commit6f8aa75329d0a4e588e58b8f22f7932bf3d3a706 (patch)
tree9bf4ba410b86ee0b262ce1b0379bbf8dc64b07e6 /crates/ra_hir_ty/src/diagnostics.rs
parent98ec5f2c21d0072e4811309ac111db75b87146d1 (diff)
Rename RecordLit -> RecordExpr
Diffstat (limited to 'crates/ra_hir_ty/src/diagnostics.rs')
-rw-r--r--crates/ra_hir_ty/src/diagnostics.rs12
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)]
30pub struct NoSuchField { 30pub 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
35impl Diagnostic for NoSuchField { 35impl Diagnostic for NoSuchField {
@@ -47,19 +47,19 @@ impl Diagnostic for NoSuchField {
47} 47}
48 48
49impl AstDiagnostic for NoSuchField { 49impl 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)]
60pub struct MissingFields { 60pub 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
82impl AstDiagnostic for MissingFields { 82impl 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