Unnamed repository; edit this file 'description' to name the repository.
Add back an assertion
Florian Diebold 2022-02-09
parent 63fd643 · commit dfd2cef
-rw-r--r--crates/hir_expand/src/fixup.rs1
-rw-r--r--crates/mbe/src/syntax_bridge.rs4
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<C: TokenConvertor>(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 {