aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-07-20 10:48:24 +0100
committerAleksey Kladov <[email protected]>2019-07-20 10:48:24 +0100
commit6d5d82e412dea19ea48eecc6f7d5a4aa223a9599 (patch)
treeddc74569a2ed64c9ad7fb451b2f83e3a53f56dfe /crates/ra_ide_api/src
parente18f8495d6569f4fc0b7457b65a1d199cf7b5974 (diff)
move debug_dump to fmt::Debug
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r--crates/ra_ide_api/src/display/navigation_target.rs2
-rw-r--r--crates/ra_ide_api/src/syntax_tree.rs6
2 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_ide_api/src/display/navigation_target.rs b/crates/ra_ide_api/src/display/navigation_target.rs
index 8aff5f2cd..c212ebf28 100644
--- a/crates/ra_ide_api/src/display/navigation_target.rs
+++ b/crates/ra_ide_api/src/display/navigation_target.rs
@@ -233,7 +233,7 @@ impl NavigationTarget {
233 233
234 pub(crate) fn from_macro_def(db: &RootDatabase, macro_call: hir::MacroDef) -> NavigationTarget { 234 pub(crate) fn from_macro_def(db: &RootDatabase, macro_call: hir::MacroDef) -> NavigationTarget {
235 let src = macro_call.source(db); 235 let src = macro_call.source(db);
236 log::debug!("nav target {}", src.ast.syntax().debug_dump()); 236 log::debug!("nav target {:#?}", src.ast.syntax());
237 NavigationTarget::from_named( 237 NavigationTarget::from_named(
238 src.file_id.original_file(db), 238 src.file_id.original_file(db),
239 &src.ast, 239 &src.ast,
diff --git a/crates/ra_ide_api/src/syntax_tree.rs b/crates/ra_ide_api/src/syntax_tree.rs
index 3d7373d02..ae1849aaa 100644
--- a/crates/ra_ide_api/src/syntax_tree.rs
+++ b/crates/ra_ide_api/src/syntax_tree.rs
@@ -25,9 +25,9 @@ pub(crate) fn syntax_tree(
25 } 25 }
26 }; 26 };
27 27
28 node.debug_dump() 28 format!("{:#?}", node)
29 } else { 29 } else {
30 parse.tree().syntax().debug_dump() 30 format!("{:#?}", parse.tree().syntax())
31 } 31 }
32} 32}
33 33
@@ -85,7 +85,7 @@ fn syntax_tree_for_token(node: &SyntaxToken, text_range: TextRange) -> Option<St
85 // If the "file" parsed without errors, 85 // If the "file" parsed without errors,
86 // return its syntax 86 // return its syntax
87 if parsed.errors().is_empty() { 87 if parsed.errors().is_empty() {
88 return Some(parsed.tree().syntax().debug_dump()); 88 return Some(format!("{:#?}", parsed.tree().syntax()));
89 } 89 }
90 90
91 None 91 None