Skip to content

Commit dfd2cef

Browse files
committed
Add back an assertion
1 parent 63fd643 commit dfd2cef

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

crates/hir_expand/src/fixup.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ mod tests {
150150
#[track_caller]
151151
fn check(ra_fixture: &str, mut expect: Expect) {
152152
let parsed = syntax::SourceFile::parse(ra_fixture);
153-
eprintln!("parse: {:#?}", parsed.syntax_node());
154153
let fixups = super::fixup_syntax(&parsed.syntax_node());
155154
let (mut tt, tmap, _) = mbe::syntax_node_to_token_tree_with_modifications(
156155
&parsed.syntax_node(),

crates/mbe/src/syntax_bridge.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,9 @@ fn convert_tokens<C: TokenConvertor>(conv: &mut C) -> tt::Subtree {
192192
continue;
193193
}
194194
let tt = if kind.is_punct() && kind != UNDERSCORE {
195-
// assert_eq!(range.len(), TextSize::of('.'));
195+
if synth_id.is_none() {
196+
assert_eq!(range.len(), TextSize::of('.'));
197+
}
196198

197199
if let Some(delim) = subtree.delimiter {
198200
let expected = match delim.kind {

0 commit comments

Comments
 (0)