aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/diagnostics.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-11-20 06:40:36 +0000
committerAleksey Kladov <[email protected]>2019-11-20 06:42:30 +0000
commit36e3fc9d5413f7e6e17e82867aae1318645880a3 (patch)
tree166ee3c45f99611f7c20740c2a246f5b3bed41a3 /crates/ra_hir/src/diagnostics.rs
parente975f6364cb3caf50467835afb0dafce887f51f0 (diff)
Rename Source::ast -> Source::value
Diffstat (limited to 'crates/ra_hir/src/diagnostics.rs')
-rw-r--r--crates/ra_hir/src/diagnostics.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_hir/src/diagnostics.rs b/crates/ra_hir/src/diagnostics.rs
index 1751e7be3..7d1b64858 100644
--- a/crates/ra_hir/src/diagnostics.rs
+++ b/crates/ra_hir/src/diagnostics.rs
@@ -21,7 +21,7 @@ impl Diagnostic for NoSuchField {
21 } 21 }
22 22
23 fn source(&self) -> Source<SyntaxNodePtr> { 23 fn source(&self) -> Source<SyntaxNodePtr> {
24 Source { file_id: self.file, ast: self.field.into() } 24 Source { file_id: self.file, value: self.field.into() }
25 } 25 }
26 26
27 fn as_any(&self) -> &(dyn Any + Send + 'static) { 27 fn as_any(&self) -> &(dyn Any + Send + 'static) {
@@ -41,7 +41,7 @@ impl Diagnostic for MissingFields {
41 "fill structure fields".to_string() 41 "fill structure fields".to_string()
42 } 42 }
43 fn source(&self) -> Source<SyntaxNodePtr> { 43 fn source(&self) -> Source<SyntaxNodePtr> {
44 Source { file_id: self.file, ast: self.field_list.into() } 44 Source { file_id: self.file, value: self.field_list.into() }
45 } 45 }
46 fn as_any(&self) -> &(dyn Any + Send + 'static) { 46 fn as_any(&self) -> &(dyn Any + Send + 'static) {
47 self 47 self
@@ -53,7 +53,7 @@ impl AstDiagnostic for MissingFields {
53 53
54 fn ast(&self, db: &impl AstDatabase) -> Self::AST { 54 fn ast(&self, db: &impl AstDatabase) -> Self::AST {
55 let root = db.parse_or_expand(self.source().file_id).unwrap(); 55 let root = db.parse_or_expand(self.source().file_id).unwrap();
56 let node = self.source().ast.to_node(&root); 56 let node = self.source().value.to_node(&root);
57 ast::RecordFieldList::cast(node).unwrap() 57 ast::RecordFieldList::cast(node).unwrap()
58 } 58 }
59} 59}
@@ -69,7 +69,7 @@ impl Diagnostic for MissingOkInTailExpr {
69 "wrap return expression in Ok".to_string() 69 "wrap return expression in Ok".to_string()
70 } 70 }
71 fn source(&self) -> Source<SyntaxNodePtr> { 71 fn source(&self) -> Source<SyntaxNodePtr> {
72 Source { file_id: self.file, ast: self.expr.into() } 72 Source { file_id: self.file, value: self.expr.into() }
73 } 73 }
74 fn as_any(&self) -> &(dyn Any + Send + 'static) { 74 fn as_any(&self) -> &(dyn Any + Send + 'static) {
75 self 75 self
@@ -81,7 +81,7 @@ impl AstDiagnostic for MissingOkInTailExpr {
81 81
82 fn ast(&self, db: &impl AstDatabase) -> Self::AST { 82 fn ast(&self, db: &impl AstDatabase) -> Self::AST {
83 let root = db.parse_or_expand(self.file).unwrap(); 83 let root = db.parse_or_expand(self.file).unwrap();
84 let node = self.source().ast.to_node(&root); 84 let node = self.source().value.to_node(&root);
85 ast::Expr::cast(node).unwrap() 85 ast::Expr::cast(node).unwrap()
86 } 86 }
87} 87}