Function rustc::ty::context::validate_hir_id_for_typeck_tables[][src]

fn validate_hir_id_for_typeck_tables(
    local_id_root: Option<DefId>,
    hir_id: HirId,
    mut_access: bool
)
🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Validate that the given HirId (respectively its local_id part) can be safely used as a key in the tables of a TypeckTable. For that to be the case, the HirId must have the same owner as all the other IDs in this table (signified by local_id_root). Otherwise the HirId would be in a different frame of reference and using its local_id would result in lookup errors, or worse, in silently wrong data being stored/returned.