diff options
Diffstat (limited to 'crates/hir/src/lib.rs')
-rw-r--r-- | crates/hir/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index b14c9a675..ccfe348a4 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs | |||
@@ -702,7 +702,7 @@ impl_from!(Struct, Union, Enum for Adt); | |||
702 | impl Adt { | 702 | impl Adt { |
703 | pub fn has_non_default_type_params(self, db: &dyn HirDatabase) -> bool { | 703 | pub fn has_non_default_type_params(self, db: &dyn HirDatabase) -> bool { |
704 | let subst = db.generic_defaults(self.into()); | 704 | let subst = db.generic_defaults(self.into()); |
705 | subst.iter().any(|ty| ty.value.is_unknown()) | 705 | subst.iter().any(|ty| ty.skip_binders().is_unknown()) |
706 | } | 706 | } |
707 | 707 | ||
708 | /// Turns this ADT into a type. Any type parameters of the ADT will be | 708 | /// Turns this ADT into a type. Any type parameters of the ADT will be |
@@ -1089,7 +1089,7 @@ pub struct TypeAlias { | |||
1089 | impl TypeAlias { | 1089 | impl TypeAlias { |
1090 | pub fn has_non_default_type_params(self, db: &dyn HirDatabase) -> bool { | 1090 | pub fn has_non_default_type_params(self, db: &dyn HirDatabase) -> bool { |
1091 | let subst = db.generic_defaults(self.id.into()); | 1091 | let subst = db.generic_defaults(self.id.into()); |
1092 | subst.iter().any(|ty| ty.value.is_unknown()) | 1092 | subst.iter().any(|ty| ty.skip_binders().is_unknown()) |
1093 | } | 1093 | } |
1094 | 1094 | ||
1095 | pub fn module(self, db: &dyn HirDatabase) -> Module { | 1095 | pub fn module(self, db: &dyn HirDatabase) -> Module { |