]> git.proxmox.com Git - rustc.git/blobdiff - compiler/rustc_lint/src/enum_intrinsics_non_enums.rs
New upstream version 1.71.1+dfsg1
[rustc.git] / compiler / rustc_lint / src / enum_intrinsics_non_enums.rs
index f1ba192f2bcc02e6c026720a95df4dd6304a12ed..2ce28f3a049e860ab4576c9741e2b06583565ce8 100644 (file)
@@ -42,7 +42,7 @@ declare_lint_pass!(EnumIntrinsicsNonEnums => [ENUM_INTRINSICS_NON_ENUMS]);
 /// Returns `true` if we know for sure that the given type is not an enum. Note that for cases where
 /// the type is generic, we can't be certain if it will be an enum so we have to assume that it is.
 fn is_non_enum(t: Ty<'_>) -> bool {
-    !t.is_enum() && !t.needs_subst()
+    !t.is_enum() && !t.has_param()
 }
 
 fn enforce_mem_discriminant(