pub fn has_non_exhaustive_attr(tcx: TyCtxt<'_>, adt: AdtDef<'_>) -> bool
Checks whether the given ADT, or any of its fields/variants, are marked as #[non_exhaustive]
#[non_exhaustive]