Merge commit '37f84c101b' into sync-from-ra

This commit is contained in:
Laurențiu Nicola 2023-07-17 16:49:15 +03:00
parent 6502421771
commit 4704881b64
311 changed files with 13700 additions and 9110 deletions

View file

@ -26,7 +26,7 @@ pub(crate) struct SyntaxFixups {
/// This is the information needed to reverse the fixups.
#[derive(Debug, Default, PartialEq, Eq)]
pub struct SyntaxFixupUndoInfo {
original: Vec<Subtree>,
original: Box<[Subtree]>,
}
const EMPTY_ID: SyntheticTokenId = SyntheticTokenId(!0);
@ -272,7 +272,7 @@ pub(crate) fn fixup_syntax(node: &SyntaxNode) -> SyntaxFixups {
replace,
token_map,
next_id,
undo_info: SyntaxFixupUndoInfo { original },
undo_info: SyntaxFixupUndoInfo { original: original.into_boxed_slice() },
}
}
@ -472,13 +472,13 @@ fn foo () {match __ra_fixup {}}
check(
r#"
fn foo() {
match x {
match it {
}
}
"#,
expect![[r#"
fn foo () {match x {}}
fn foo () {match it {}}
"#]],
)
}
@ -547,11 +547,11 @@ fn foo () {a . __ra_fixup ; bar () ;}
check(
r#"
fn foo() {
let x = a
let it = a
}
"#,
expect![[r#"
fn foo () {let x = a ;}
fn foo () {let it = a ;}
"#]],
)
}
@ -561,11 +561,11 @@ fn foo () {let x = a ;}
check(
r#"
fn foo() {
let x = a.
let it = a.
}
"#,
expect![[r#"
fn foo () {let x = a . __ra_fixup ;}
fn foo () {let it = a . __ra_fixup ;}
"#]],
)
}