From 51baaf298d4ac56036062786bf070aeab7ab8e79 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 20 Nov 2019 13:09:21 +0300 Subject: Rename with_ast -> with_value --- crates/ra_ide_api/src/display/navigation_target.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/ra_ide_api/src/display/navigation_target.rs') 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 { //FIXME: use `_` instead of empty string let name = node.value.name().map(|it| it.text().clone()).unwrap_or_default(); let focus_range = - node.value.name().map(|it| original_range(db, node.with_ast(it.syntax())).range); + node.value.name().map(|it| original_range(db, node.with_value(it.syntax())).range); let frange = original_range(db, node.map(|it| it.syntax())); NavigationTarget::from_syntax( @@ -232,7 +232,7 @@ impl ToNav for hir::Module { let name = self.name(db).map(|it| it.to_string().into()).unwrap_or_default(); match &src.value { ModuleSource::SourceFile(node) => { - let frange = original_range(db, src.with_ast(node.syntax())); + let frange = original_range(db, src.with_value(node.syntax())); NavigationTarget::from_syntax( frange.file_id, @@ -245,7 +245,7 @@ impl ToNav for hir::Module { ) } ModuleSource::Module(node) => { - let frange = original_range(db, src.with_ast(node.syntax())); + let frange = original_range(db, src.with_value(node.syntax())); NavigationTarget::from_syntax( frange.file_id, @@ -285,12 +285,12 @@ impl ToNav for hir::StructField { match &src.value { FieldSource::Named(it) => NavigationTarget::from_named( db, - src.with_ast(it), + src.with_value(it), it.doc_comment_text(), it.short_label(), ), FieldSource::Pos(it) => { - let frange = original_range(db, src.with_ast(it.syntax())); + let frange = original_range(db, src.with_value(it.syntax())); NavigationTarget::from_syntax( frange.file_id, "".into(), -- cgit v1.2.3