fn validate_hir_id_for_typeck_tables(hir_owner: LocalDefId, hir_id: hir::HirId) {
    if hir_id.owner != hir_owner {
        ty::tls::with(|tcx| {
            bug!(
                "node {} with HirId::owner {:?} cannot be placed in TypeckTables with hir_owner {:?}",
                tcx.hir().node_to_string(hir_id),
                hir_id.owner,
                hir_owner
            )
        });
    }
}
/// 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 `hir_owner`). 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.
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 `hir_owner`). 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.
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 ` hir_owner ` ) . 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 .
fn validate_hir_id_for_typeck_tables(hir_owner: LocalDefId, hir_id: hir::HirId) {
    if hir_id.owner != hir_owner {
        ty::tls::with(|tcx| {
            bug!(
                "node {} with HirId::owner {:?} cannot be placed in TypeckTables with hir_owner {:?}",
                tcx.hir().node_to_string(hir_id),
                hir_id.owner,
                hir_owner
            )
        });
    }
}
fn validate_hir_id_for_typeck_tables ( hir_owner : LocalDefId , hir_id : hir :: HirId ) { if hir_id . owner != hir_owner { ty :: tls :: with ( | tcx | { bug ! ( " " tcx hir ( ) node_to_string ( hir_id ) hir_id owner hir_owner ) } ) ; } }
Validate that the given HirId (respectively its `local_id` part) can be
safely used as a key in the tables of a TypeckTable.
Validate that the given HirId ( respectively its ` local_id ` part ) can be safely used as a key in the tables of a TypeckTable .
hir_owner
LocalDefId
hir_id
hir::HirId
hir_owner
LocalDefId
hir_id
hir::HirId