fn type_ns_kind(def: Def, path_str: &str) -> (&'static str, &'static str, String) {
    let (kind, article) = match def {
        // we can still have non-tuple structs
        Def::Struct(..) => ("struct", "a"),
        Def::Enum(..) => ("enum", "an"),
        Def::Trait(..) => ("trait", "a"),
        Def::Union(..) => ("union", "a"),
        _ => ("type", "a"),
    };
    (kind, article, format!("{}@{}", kind, path_str))
}
/// Given a def, returns its name, the article to be used, and a disambiguator
/// for the type namespace
Given a def, returns its name, the article to be used, and a disambiguator
for the type namespace
Given a def returns its name the article to be used and a disambiguator for the type namespace
fn type_ns_kind(def: Def, path_str: &str) -> (&'static str, &'static str, String) {
    let (kind, article) = match def {
        // we can still have non-tuple structs
        Def::Struct(..) => ("struct", "a"),
        Def::Enum(..) => ("enum", "an"),
        Def::Trait(..) => ("trait", "a"),
        Def::Union(..) => ("union", "a"),
        _ => ("type", "a"),
    };
    (kind, article, format!("{}@{}", kind, path_str))
}
fn type_ns_kind ( def : Def , path_str : & str ) -> ( & ' static str , & ' static str , String ) { let ( kind , article ) = match def { // we can still have non-tuple structs Def :: Struct ( .. ) => ( " " , " " ) , Def :: Enum ( .. ) => ( " " , " " ) , Def :: Trait ( .. ) => ( " " , " " ) , Def :: Union ( .. ) => ( " " , " " ) , _ => ( " " , " " ) , } ; ( kind , article , format ! ( " " kind path_str ) ) }
Given a def, returns its name, the article to be used, and a disambiguator
for the type namespace
Given a def returns its name the article to be used and a disambiguator for the type namespace
def
Def
path_str
&str