Function rustc::middle::ty::trait_method_of_method[src]

pub fn trait_method_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 method inside trait definition (this means that if the given def ID is already that of the original trait method, then the return value is the same). Otherwise, return None.