Support spans with proc macro servers from before the ast id changes

The only thing changed is the value of the fixup ast id, so we just swap it.
This commit is contained in:
Chayim Refael Friedman 2025-06-12 15:32:08 +03:00
parent c15fc9a344
commit 3e834add61
10 changed files with 96 additions and 102 deletions

View file

@ -55,7 +55,7 @@ pub enum SpanMode {
Id,
/// Rust Analyzer-specific span handling mode.
RustAnalyzer { fixup_ast_id: u32 },
RustAnalyzer,
}
/// Represents responses sent from the proc-macro-srv to the client.
@ -308,7 +308,7 @@ mod tests {
#[test]
fn test_proc_macro_rpc_works() {
let tt = fixture_token_tree();
for v in HASHED_AST_ID..=CURRENT_API_VERSION {
for v in RUST_ANALYZER_SPAN_SUPPORT..=CURRENT_API_VERSION {
let mut span_data_table = Default::default();
let task = ExpandMacro {
data: ExpandMacroData {