Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_def/src/macro_expansion_tests.rs')
-rw-r--r--crates/hir_def/src/macro_expansion_tests.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/hir_def/src/macro_expansion_tests.rs b/crates/hir_def/src/macro_expansion_tests.rs
index ac0a2d27b3..0a9ab93157 100644
--- a/crates/hir_def/src/macro_expansion_tests.rs
+++ b/crates/hir_def/src/macro_expansion_tests.rs
@@ -69,6 +69,13 @@ fn check(ra_fixture: &str, mut expect: Expect) {
let indent = IndentLevel::from_node(call.syntax());
let pp = reindent(indent, pp);
format_to!(expn_text, "{}", pp);
+ if call.to_string().contains("// +tree") {
+ let tree = format!("{:#?}", parse.syntax_node())
+ .split_inclusive("\n")
+ .map(|line| format!("// {}", line))
+ .collect::<String>();
+ format_to!(expn_text, "\n{}", tree)
+ }
}
let range = call.syntax().text_range();
let range: Range<usize> = range.into();