pub fn adt_from_ty<'tcx>(ty: Ty<'tcx>) -> Option<(DefId, GenericArgsRef<'tcx>)>
Unwrap Ref / RawPtr / Adt layers to get the innermost ADT definition.