Fix syntax fixup producing invalid punctuation

Fixes #19206.
Fixes #18244.
This commit is contained in:
¨Florian 2025-02-28 17:32:21 +01:00
parent 62dea277cc
commit 5335d8cbc5
5 changed files with 105 additions and 88 deletions

View file

@ -99,6 +99,23 @@ fn check(
);
}
#[test]
fn unbalanced_brace() {
check(
Edition::CURRENT,
Edition::CURRENT,
r#"
() => { { }
"#,
r#""#,
expect![[r#"
SUBTREE $$ 1:0@0..0#2 1:0@0..0#2
SUBTREE {} 0:0@9..10#2 0:0@11..12#2
{}"#]],
);
}
#[test]
fn token_mapping_smoke_test() {
check(