// Translate a DefId from the current compilation environment to a DefId
// for an external crate.
Translate a DefId from the current compilation environment to a DefId
for an external crate.
Translate a DefId from the current compilation environment to a DefId for an external crate .
fn reverse_translate_def_id(cdata: Cmd, did: DefId) -> Option<DefId> {
    if did.krate == cdata.cnum {
        return Some(DefId { krate: LOCAL_CRATE, node: did.node });
    }
    for (&local, &global) in cdata.cnum_map.borrow().iter() {
        if global == did.krate {
            return Some(DefId { krate: local, node: did.node });
        }
    }
    None
}
fn reverse_translate_def_id ( cdata : Cmd , did : DefId ) -> Option < DefId > { if did . krate == cdata . cnum { return Some ( DefId { krate : LOCAL_CRATE , node : did . node } ) ; } for ( & local , & global ) in cdata . cnum_map . borrow ( ) . iter ( ) { if global == did . krate { return Some ( DefId { krate : local , node : did . node } ) ; } } None }
Translate a DefId from the current compilation environment to a DefId
for an external crate.
Translate a DefId from the current compilation environment to a DefId for an external crate .
cdata
Cmd
did
DefId