From dfd2cef0d0a8d3fa8b76eb1a5553658e40c33667 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Wed, 9 Feb 2022 16:36:06 +0100 Subject: [PATCH] Add back an assertion --- crates/hir_expand/src/fixup.rs | 1 - crates/mbe/src/syntax_bridge.rs | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/hir_expand/src/fixup.rs b/crates/hir_expand/src/fixup.rs index 36425c8078..622d019c47 100644 --- a/crates/hir_expand/src/fixup.rs +++ b/crates/hir_expand/src/fixup.rs @@ -150,7 +150,6 @@ mod tests { #[track_caller] fn check(ra_fixture: &str, mut expect: Expect) { let parsed = syntax::SourceFile::parse(ra_fixture); - eprintln!("parse: {:#?}", parsed.syntax_node()); let fixups = super::fixup_syntax(&parsed.syntax_node()); let (mut tt, tmap, _) = mbe::syntax_node_to_token_tree_with_modifications( &parsed.syntax_node(), diff --git a/crates/mbe/src/syntax_bridge.rs b/crates/mbe/src/syntax_bridge.rs index 83f97c4970..7e12647cd8 100644 --- a/crates/mbe/src/syntax_bridge.rs +++ b/crates/mbe/src/syntax_bridge.rs @@ -192,7 +192,9 @@ fn convert_tokens(conv: &mut C) -> tt::Subtree { continue; } let tt = if kind.is_punct() && kind != UNDERSCORE { - // assert_eq!(range.len(), TextSize::of('.')); + if synth_id.is_none() { + assert_eq!(range.len(), TextSize::of('.')); + } if let Some(delim) = subtree.delimiter { let expected = match delim.kind {