Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/lib.rs')
| -rw-r--r-- | crates/hir-ty/src/lib.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/hir-ty/src/lib.rs b/crates/hir-ty/src/lib.rs index ad8202d4d2..b12ccf7c83 100644 --- a/crates/hir-ty/src/lib.rs +++ b/crates/hir-ty/src/lib.rs @@ -288,7 +288,7 @@ impl Hash for ConstScalar { /// Return an index of a parameter in the generic type parameter list by it's id. pub fn param_idx(db: &dyn HirDatabase, id: TypeOrConstParamId) -> Option<usize> { - generics(db.upcast(), id.parent).param_idx(id) + generics(db.upcast(), id.parent).type_or_const_param_idx(id) } pub(crate) fn wrap_empty_binders<T>(value: T) -> Binders<T> @@ -603,15 +603,17 @@ pub enum ImplTraitId { } impl_intern_value_trivial!(ImplTraitId); -#[derive(Clone, PartialEq, Eq, Debug, Hash)] +#[derive(PartialEq, Eq, Debug, Hash)] pub struct ImplTraits { pub(crate) impl_traits: Arena<ImplTrait>, } has_interner!(ImplTraits); -#[derive(Clone, PartialEq, Eq, Debug, Hash)] +#[derive(PartialEq, Eq, Debug, Hash)] pub struct ImplTrait { + // FIXME: Should be Arc<[QuantifiedWhereClause]>, but the HasInterner impl for Arc is missing a + // ?Sized bound pub(crate) bounds: Binders<Vec<QuantifiedWhereClause>>, } |