mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
move debug_dump to fmt::Debug
This commit is contained in:
parent
e18f8495d6
commit
6d5d82e412
10 changed files with 42 additions and 50 deletions
|
@ -233,7 +233,7 @@ impl NavigationTarget {
|
|||
|
||||
pub(crate) fn from_macro_def(db: &RootDatabase, macro_call: hir::MacroDef) -> NavigationTarget {
|
||||
let src = macro_call.source(db);
|
||||
log::debug!("nav target {}", src.ast.syntax().debug_dump());
|
||||
log::debug!("nav target {:#?}", src.ast.syntax());
|
||||
NavigationTarget::from_named(
|
||||
src.file_id.original_file(db),
|
||||
&src.ast,
|
||||
|
|
|
@ -25,9 +25,9 @@ pub(crate) fn syntax_tree(
|
|||
}
|
||||
};
|
||||
|
||||
node.debug_dump()
|
||||
format!("{:#?}", node)
|
||||
} else {
|
||||
parse.tree().syntax().debug_dump()
|
||||
format!("{:#?}", parse.tree().syntax())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ fn syntax_tree_for_token(node: &SyntaxToken, text_range: TextRange) -> Option<St
|
|||
// If the "file" parsed without errors,
|
||||
// return its syntax
|
||||
if parsed.errors().is_empty() {
|
||||
return Some(parsed.tree().syntax().debug_dump());
|
||||
return Some(format!("{:#?}", parsed.tree().syntax()));
|
||||
}
|
||||
|
||||
None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue