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 and mutable references to ADTs map to the ADT’s def path (e.g.
core::num::NonZero). Slice references map to the built-in [T] key and
carry their element type; anything else falls back to the type’s Debug
representation.