diff options
author | Aleksey Kladov <[email protected]> | 2019-11-20 06:40:36 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-11-20 06:42:30 +0000 |
commit | 36e3fc9d5413f7e6e17e82867aae1318645880a3 (patch) | |
tree | 166ee3c45f99611f7c20740c2a246f5b3bed41a3 /crates/ra_ide_api/src/references/search_scope.rs | |
parent | e975f6364cb3caf50467835afb0dafce887f51f0 (diff) |
Rename Source::ast -> Source::value
Diffstat (limited to 'crates/ra_ide_api/src/references/search_scope.rs')
-rw-r--r-- | crates/ra_ide_api/src/references/search_scope.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_ide_api/src/references/search_scope.rs b/crates/ra_ide_api/src/references/search_scope.rs index 2907787c2..f5c9589f4 100644 --- a/crates/ra_ide_api/src/references/search_scope.rs +++ b/crates/ra_ide_api/src/references/search_scope.rs | |||
@@ -73,9 +73,9 @@ impl NameDefinition { | |||
73 | 73 | ||
74 | if let NameKind::Local(var) = self.kind { | 74 | if let NameKind::Local(var) = self.kind { |
75 | let range = match var.parent(db) { | 75 | let range = match var.parent(db) { |
76 | DefWithBody::Function(f) => f.source(db).ast.syntax().text_range(), | 76 | DefWithBody::Function(f) => f.source(db).value.syntax().text_range(), |
77 | DefWithBody::Const(c) => c.source(db).ast.syntax().text_range(), | 77 | DefWithBody::Const(c) => c.source(db).value.syntax().text_range(), |
78 | DefWithBody::Static(s) => s.source(db).ast.syntax().text_range(), | 78 | DefWithBody::Static(s) => s.source(db).value.syntax().text_range(), |
79 | }; | 79 | }; |
80 | let mut res = FxHashMap::default(); | 80 | let mut res = FxHashMap::default(); |
81 | res.insert(file_id, Some(range)); | 81 | res.insert(file_id, Some(range)); |
@@ -91,7 +91,7 @@ impl NameDefinition { | |||
91 | let parent_src = parent_module.definition_source(db); | 91 | let parent_src = parent_module.definition_source(db); |
92 | let file_id = parent_src.file_id.original_file(db); | 92 | let file_id = parent_src.file_id.original_file(db); |
93 | 93 | ||
94 | match parent_src.ast { | 94 | match parent_src.value { |
95 | ModuleSource::Module(m) => { | 95 | ModuleSource::Module(m) => { |
96 | let range = Some(m.syntax().text_range()); | 96 | let range = Some(m.syntax().text_range()); |
97 | res.insert(file_id, range); | 97 | res.insert(file_id, range); |
@@ -135,7 +135,7 @@ impl NameDefinition { | |||
135 | } | 135 | } |
136 | 136 | ||
137 | let mut res = FxHashMap::default(); | 137 | let mut res = FxHashMap::default(); |
138 | let range = match module_src.ast { | 138 | let range = match module_src.value { |
139 | ModuleSource::Module(m) => Some(m.syntax().text_range()), | 139 | ModuleSource::Module(m) => Some(m.syntax().text_range()), |
140 | ModuleSource::SourceFile(_) => None, | 140 | ModuleSource::SourceFile(_) => None, |
141 | }; | 141 | }; |