pub(super) fn is_foreign_non_exhaustive_enum(&self, ty: Ty<'tcx>) -> bool {
        match ty.kind() {
            ty::Adt(def, ..) => {
                def.is_enum() && def.is_variant_list_non_exhaustive() && !def.did.is_local()
            }
            _ => false,
        }
    }
/// Returns whether the given type is an enum from another crate declared `#[non_exhaustive]`.
Returns whether the given type is an enum from another crate declared `#[non_exhaustive]`.
Returns whether the given type is an enum from another crate declared ` # [ non_exhaustive ] ` .
pub(super) fn is_foreign_non_exhaustive_enum(&self, ty: Ty<'tcx>) -> bool {
        match ty.kind() {
            ty::Adt(def, ..) => {
                def.is_enum() && def.is_variant_list_non_exhaustive() && !def.did.is_local()
            }
            _ => false,
        }
    }
pub ( super ) fn is_foreign_non_exhaustive_enum ( & self , ty : Ty < ' tcx > ) -> bool { match ty . kind ( ) { ty :: Adt ( def , .. ) => { def . is_enum ( ) && def . is_variant_list_non_exhaustive ( ) && ! def . did . is_local ( ) } _ => false , } }
Returns whether the given type is an enum from another crate declared `#[non_exhaustive]`.
Returns whether the given type is an enum from another crate declared ` # [ non_exhaustive ] ` .
&self
ty
Ty<'tcx>
&self
ty
Ty<'tcx>