mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-12 05:08:52 +00:00
Add back an assertion
This commit is contained in:
parent
63fd643d72
commit
dfd2cef0d0
2 changed files with 3 additions and 2 deletions
|
@ -150,7 +150,6 @@ mod tests {
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
fn check(ra_fixture: &str, mut expect: Expect) {
|
fn check(ra_fixture: &str, mut expect: Expect) {
|
||||||
let parsed = syntax::SourceFile::parse(ra_fixture);
|
let parsed = syntax::SourceFile::parse(ra_fixture);
|
||||||
eprintln!("parse: {:#?}", parsed.syntax_node());
|
|
||||||
let fixups = super::fixup_syntax(&parsed.syntax_node());
|
let fixups = super::fixup_syntax(&parsed.syntax_node());
|
||||||
let (mut tt, tmap, _) = mbe::syntax_node_to_token_tree_with_modifications(
|
let (mut tt, tmap, _) = mbe::syntax_node_to_token_tree_with_modifications(
|
||||||
&parsed.syntax_node(),
|
&parsed.syntax_node(),
|
||||||
|
|
|
@ -192,7 +192,9 @@ fn convert_tokens<C: TokenConvertor>(conv: &mut C) -> tt::Subtree {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let tt = if kind.is_punct() && kind != UNDERSCORE {
|
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 {
|
if let Some(delim) = subtree.delimiter {
|
||||||
let expected = match delim.kind {
|
let expected = match delim.kind {
|
||||||
|
|
Loading…
Reference in a new issue