Function rustc::middle::ty::trait_of_method[src]
pub fn trait_of_method(tcx: &ctxt, def_id: DefId) -> Option<DefId>
If the given def ID describes a method belonging to a trait (either a
default method or an implementation of a trait method), return the ID of
the trait that the method belongs to. Otherwise, return None.