diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-20 10:10:03 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-20 10:10:03 +0000 |
commit | 3d56e3d85516fe9061aea84571ac88c3322a687c (patch) | |
tree | bd923b623ffe43df04ef00e1f0662c00c0d919d1 /crates/ra_ide_api/src/display | |
parent | fa50b16cb2309c0c4fcb4e90378993a1f3d2ffb6 (diff) | |
parent | 51baaf298d4ac56036062786bf070aeab7ab8e79 (diff) |
Merge #2323
2323: Rename with_ast -> with_value r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/display')
-rw-r--r-- | crates/ra_ide_api/src/display/navigation_target.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_ide_api/src/display/navigation_target.rs b/crates/ra_ide_api/src/display/navigation_target.rs index 50accafd0..6ac60722b 100644 --- a/crates/ra_ide_api/src/display/navigation_target.rs +++ b/crates/ra_ide_api/src/display/navigation_target.rs | |||
@@ -148,7 +148,7 @@ impl NavigationTarget { | |||
148 | //FIXME: use `_` instead of empty string | 148 | //FIXME: use `_` instead of empty string |
149 | let name = node.value.name().map(|it| it.text().clone()).unwrap_or_default(); | 149 | let name = node.value.name().map(|it| it.text().clone()).unwrap_or_default(); |
150 | let focus_range = | 150 | let focus_range = |
151 | node.value.name().map(|it| original_range(db, node.with_ast(it.syntax())).range); | 151 | node.value.name().map(|it| original_range(db, node.with_value(it.syntax())).range); |
152 | let frange = original_range(db, node.map(|it| it.syntax())); | 152 | let frange = original_range(db, node.map(|it| it.syntax())); |
153 | 153 | ||
154 | NavigationTarget::from_syntax( | 154 | NavigationTarget::from_syntax( |
@@ -232,7 +232,7 @@ impl ToNav for hir::Module { | |||
232 | let name = self.name(db).map(|it| it.to_string().into()).unwrap_or_default(); | 232 | let name = self.name(db).map(|it| it.to_string().into()).unwrap_or_default(); |
233 | match &src.value { | 233 | match &src.value { |
234 | ModuleSource::SourceFile(node) => { | 234 | ModuleSource::SourceFile(node) => { |
235 | let frange = original_range(db, src.with_ast(node.syntax())); | 235 | let frange = original_range(db, src.with_value(node.syntax())); |
236 | 236 | ||
237 | NavigationTarget::from_syntax( | 237 | NavigationTarget::from_syntax( |
238 | frange.file_id, | 238 | frange.file_id, |
@@ -245,7 +245,7 @@ impl ToNav for hir::Module { | |||
245 | ) | 245 | ) |
246 | } | 246 | } |
247 | ModuleSource::Module(node) => { | 247 | ModuleSource::Module(node) => { |
248 | let frange = original_range(db, src.with_ast(node.syntax())); | 248 | let frange = original_range(db, src.with_value(node.syntax())); |
249 | 249 | ||
250 | NavigationTarget::from_syntax( | 250 | NavigationTarget::from_syntax( |
251 | frange.file_id, | 251 | frange.file_id, |
@@ -285,12 +285,12 @@ impl ToNav for hir::StructField { | |||
285 | match &src.value { | 285 | match &src.value { |
286 | FieldSource::Named(it) => NavigationTarget::from_named( | 286 | FieldSource::Named(it) => NavigationTarget::from_named( |
287 | db, | 287 | db, |
288 | src.with_ast(it), | 288 | src.with_value(it), |
289 | it.doc_comment_text(), | 289 | it.doc_comment_text(), |
290 | it.short_label(), | 290 | it.short_label(), |
291 | ), | 291 | ), |
292 | FieldSource::Pos(it) => { | 292 | FieldSource::Pos(it) => { |
293 | let frange = original_range(db, src.with_ast(it.syntax())); | 293 | let frange = original_range(db, src.with_value(it.syntax())); |
294 | NavigationTarget::from_syntax( | 294 | NavigationTarget::from_syntax( |
295 | frange.file_id, | 295 | frange.file_id, |
296 | "".into(), | 296 | "".into(), |