fn type_path_key<'tcx>(
tcx: TyCtxt<'tcx>,
ty: Ty<'tcx>,
) -> (String, Option<Ty<'tcx>>)Expand description
Generate a normalised type path key for lookups in the type-invariants DB, together with the element type for the built-in slice entry.
ADTs map to their def path (e.g. core::num::NonZero); &[T] / &mut [T]
slice references map to the built-in [T] key and carry their element type
(resolved via $elem during instantiation); anything else falls back to the
type’s Debug representation.