Skip to main content

FIRSTPARTY_FILE_ID_BASE

Constant FIRSTPARTY_FILE_ID_BASE 

Source
pub const FIRSTPARTY_FILE_ID_BASE: u32 = 0xFFFF_0000;
Expand description

#1956: the first FileId reserved for first-party synthetic units. Each unit’s spans carry FIRSTPARTY_FILE_ID_BASE + id_block (firstparty_file_id), fixed for the same reason as its ExprId block: the parse is cached per process, so the id can’t come from any one project’s interner. The range sits just below FileId::UNKNOWN (u32::MAX), far above any id parse_cache::file_id_for hands a real file. Without an identity of their own, a first-party span counted as the error’s own file, and a “declared here” label into bynk.bynk was drawn at the same offsets in the user’s.