Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/span/src/lib.rs')
-rw-r--r--crates/span/src/lib.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/span/src/lib.rs b/crates/span/src/lib.rs
index 7341a529a6..7617acde64 100644
--- a/crates/span/src/lib.rs
+++ b/crates/span/src/lib.rs
@@ -30,6 +30,13 @@ pub type ErasedFileAstId = la_arena::Idx<syntax::SyntaxNodePtr>;
pub const ROOT_ERASED_FILE_AST_ID: ErasedFileAstId =
la_arena::Idx::from_raw(la_arena::RawIdx::from_u32(0));
+/// FileId used as the span for syntax node fixups. Any Span containing this file id is to be
+/// considered fake.
+pub const FIXUP_ERASED_FILE_AST_ID_MARKER: ErasedFileAstId =
+ // we pick the second to last for this in case we every consider making this a NonMaxU32, this
+ // is required to be stable for the proc-macro-server
+ la_arena::Idx::from_raw(la_arena::RawIdx::from_u32(!0 - 1));
+
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
pub struct SpanData<Ctx> {
/// The text range of this span, relative to the anchor.