pub fn def_id_display_name(tcx: TyCtxt<'_>, def_id: DefId) -> String {
    struct PrettyDefId<'tcx>(DefId, TyCtxt<'tcx>);
    impl std::fmt::Debug for PrettyDefId<'_> {
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
            FmtPrinter::new(self.1, f, rustc_hir::def::Namespace::ValueNS)
                .print_def_path(self.0, &[])?;
            Ok(())
        }
    }
    format!("{:?}", PrettyDefId(def_id, tcx))
}
/// Returns a readable display name for a DefId. This name may not be unique.
Returns a readable display name for a DefId. This name may not be unique.
Returns a readable display name for a DefId . This name may not be unique .
pub fn def_id_display_name(tcx: TyCtxt<'_>, def_id: DefId) -> String {
    struct PrettyDefId<'tcx>(DefId, TyCtxt<'tcx>);
    impl std::fmt::Debug for PrettyDefId<'_> {
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
            FmtPrinter::new(self.1, f, rustc_hir::def::Namespace::ValueNS)
                .print_def_path(self.0, &[])?;
            Ok(())
        }
    }
    format!("{:?}", PrettyDefId(def_id, tcx))
}
pub fn def_id_display_name ( tcx : TyCtxt < ' _ > , def_id : DefId ) -> String { struct PrettyDefId < ' tcx > ( DefId , TyCtxt < ' tcx > ) ; impl std :: fmt :: Debug for PrettyDefId < ' _ > { fn fmt ( & self , f : & mut std :: fmt :: Formatter < ' _ > ) -> std :: fmt :: Result { FmtPrinter :: new ( self . 1 , f , rustc_hir :: def :: Namespace :: ValueNS ) . print_def_path ( self . 0 , & [ ] ) ? ; Ok ( ( ) ) } } format ! ( " " PrettyDefId ( def_id tcx ) ) }
Returns a readable display name for a DefId.
Returns a readable display name for a DefId .
tcx
TyCtxt<'_>
def_id
DefId