Function rustc::middle::ty::trait_id_of_impl[src]
pub fn trait_id_of_impl(tcx: &ctxt, def_id: DefId) -> Option<DefId>
Given the def_id of an impl, return the def_id of the trait it implements.
If it implements no trait, return None.
pub fn trait_id_of_impl(tcx: &ctxt, def_id: DefId) -> Option<DefId>
Given the def_id of an impl, return the def_id of the trait it implements.
If it implements no trait, return None.
Prefix searches with a type followed by a colon (e.g.
fn:) to restrict the search to a given type.
Accepted types are: fn, mod,
struct (or str), enum,
trait, typedef (or
tdef).