[−][src]Function rustc_middle::ty::print::characteristic_def_id_of_type

pub fn characteristic_def_id_of_type(ty: Ty<'_>) -> Option<DefId>

As a heuristic, when we see an impl, if we see that the 'self type' is a type defined in the same module as the impl, we can omit including the path to the impl itself. This function tries to find a "characteristic DefId" for a type. It's just a heuristic so it makes some questionable decisions and we may want to adjust it later.