mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-03 21:25:25 +00:00
Fix syntax fixup producing invalid punctuation
Fixes #19206. Fixes #18244.
This commit is contained in:
parent
62dea277cc
commit
5335d8cbc5
5 changed files with 105 additions and 88 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue