pub fn translate_def_id(cdata: Cmd, did: DefId) -> DefId {
    if did.is_local() {
        return DefId { krate: cdata.cnum, index: did.index };
    }

    DefId {
        krate: cdata.cnum_map.borrow()[did.krate],
        index: did.index
    }
}
// Translates a def_id from an external crate to a def_id for the current
// compilation environment. We use this when trying to load types from
// external crates - if those types further refer to types in other crates
// then we must translate the crate number from that encoded in the external
// crate to the correct local crate number.
Translates a def_id from an external crate to a def_id for the current
compilation environment. We use this when trying to load types from
external crates - if those types further refer to types in other crates
then we must translate the crate number from that encoded in the external
crate to the correct local crate number.
Translates a def_id from an external crate to a def_id for the current compilation environment . We use this when trying to load types from external crates - if those types further refer to types in other crates then we must translate the crate number from that encoded in the external crate to the correct local crate number .
pub fn translate_def_id(cdata: Cmd, did: DefId) -> DefId {
    if did.is_local() {
        return DefId { krate: cdata.cnum, index: did.index };
    }
    DefId {
        krate: cdata.cnum_map.borrow()[did.krate],
        index: did.index
    }
}
pub fn translate_def_id ( cdata : Cmd , did : DefId ) -> DefId { if did . is_local ( ) { return DefId { krate : cdata . cnum , index : did . index } ; } DefId { krate : cdata . cnum_map . borrow ( ) [ did . krate ] , index : did . index } }
Translates a def_id from an external crate to a def_id for the current
compilation environment.
Translates a def_id from an external crate to a def_id for the current compilation environment .
cdata
Cmd
did
DefId
cdata
Cmd
did
DefId