diff options
Diffstat (limited to 'crates/ra_hir')
-rw-r--r-- | crates/ra_hir/src/ids.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/crates/ra_hir/src/ids.rs b/crates/ra_hir/src/ids.rs index 05a18eb56..ec756f2c3 100644 --- a/crates/ra_hir/src/ids.rs +++ b/crates/ra_hir/src/ids.rs | |||
@@ -362,7 +362,16 @@ impl MacroCallId { | |||
362 | pub fn debug_dump(self, db: &impl AstDatabase) -> String { | 362 | pub fn debug_dump(self, db: &impl AstDatabase) -> String { |
363 | let loc = self.loc(db); | 363 | let loc = self.loc(db); |
364 | let node = loc.ast_id.to_node(db); | 364 | let node = loc.ast_id.to_node(db); |
365 | let syntax_str = node.syntax().text().chunks().collect::<Vec<_>>().join(" "); | 365 | let syntax_str = { |
366 | let mut res = String::new(); | ||
367 | node.syntax().text().for_each_chunk(|chunk| { | ||
368 | if !res.is_empty() { | ||
369 | res.push(' ') | ||
370 | } | ||
371 | res.push_str(chunk) | ||
372 | }); | ||
373 | res | ||
374 | }; | ||
366 | 375 | ||
367 | // dump the file name | 376 | // dump the file name |
368 | let file_id: HirFileId = self.loc(db).ast_id.file_id(); | 377 | let file_id: HirFileId = self.loc(db).ast_id.file_id(); |