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

@ -108,7 +108,8 @@ impl fmt::Debug for ErasedFileAstId {
#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq)]
enum ErasedFileAstIdKind {
Root,
/// This needs to not change because it's depended upon by the proc macro server.
Fixup,
// The following are associated with `ErasedHasNameFileAstId`.
Enum,
Struct,
@ -143,7 +144,7 @@ enum ErasedFileAstIdKind {
/// Associated with [`BlockExprFileAstId`].
BlockExpr,
/// Keep this last.
Fixup,
Root,
}
// First hash, then index, then kind.
@ -218,7 +219,7 @@ impl ErasedFileAstId {
}
#[inline]
pub fn from_raw(v: u32) -> Self {
pub const fn from_raw(v: u32) -> Self {
Self(v)
}
}