From 6f8aa75329d0a4e588e58b8f22f7932bf3d3a706 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 16:21:30 +0200 Subject: Rename RecordLit -> RecordExpr --- crates/ra_hir_ty/src/diagnostics.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'crates/ra_hir_ty/src/diagnostics.rs') 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 #[derive(Debug)] pub struct NoSuchField { pub file: HirFileId, - pub field: AstPtr, + pub field: AstPtr, } impl Diagnostic for NoSuchField { @@ -47,19 +47,19 @@ impl Diagnostic for NoSuchField { } impl AstDiagnostic for NoSuchField { - type AST = ast::RecordField; + type AST = ast::RecordExprField; fn ast(&self, db: &dyn AstDatabase) -> Self::AST { let root = db.parse_or_expand(self.source().file_id).unwrap(); let node = self.source().value.to_node(&root); - ast::RecordField::cast(node).unwrap() + ast::RecordExprField::cast(node).unwrap() } } #[derive(Debug)] pub struct MissingFields { pub file: HirFileId, - pub field_list: AstPtr, + pub field_list: AstPtr, pub missed_fields: Vec, } @@ -80,12 +80,12 @@ impl Diagnostic for MissingFields { } impl AstDiagnostic for MissingFields { - type AST = ast::RecordFieldList; + type AST = ast::RecordExprFieldList; fn ast(&self, db: &dyn AstDatabase) -> Self::AST { let root = db.parse_or_expand(self.source().file_id).unwrap(); let node = self.source().value.to_node(&root); - ast::RecordFieldList::cast(node).unwrap() + ast::RecordExprFieldList::cast(node).unwrap() } } -- cgit v1.2.3 From 14cb96ec0e6be3b99bfe4ea373c058dcbd2a4f79 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 31 Jul 2020 19:54:16 +0200 Subject: Allign RecordPat with RecordExpr --- crates/ra_hir_ty/src/diagnostics.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_hir_ty/src/diagnostics.rs') diff --git a/crates/ra_hir_ty/src/diagnostics.rs b/crates/ra_hir_ty/src/diagnostics.rs index f210c305a..977c0525b 100644 --- a/crates/ra_hir_ty/src/diagnostics.rs +++ b/crates/ra_hir_ty/src/diagnostics.rs @@ -92,7 +92,7 @@ impl AstDiagnostic for MissingFields { #[derive(Debug)] pub struct MissingPatFields { pub file: HirFileId, - pub field_list: AstPtr, + pub field_list: AstPtr, pub missed_fields: Vec, } -- cgit v1.2.3