Skip to main content

push_source_id

Function push_source_id 

Source
pub fn push_source_id(id: u32) -> SourceIdGuard
Expand description

Set CURRENT_SOURCE_ID to id, returning an RAII guard that restores the previous id on drop. Used at thunk force so a cross-file thunk’s idents key the (source_id, offset) symbol cache against the file where the thunk was DEFINED, not the ambient source at force time — the sibling of the eval-file guard, closing the parse.nix cross-file collision.