From 508a1ecad3cf9c9f01022b3e95f9d6a7ad7a4cd5 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sun, 4 Apr 2021 20:22:00 +0200 Subject: Move things in hir_ty into submodules - all the types that will be replaced by Chalk go to `types` - `TypeWalk` impls go to `walk` --- crates/hir_ty/src/traits/chalk/mapping.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/hir_ty/src/traits/chalk') diff --git a/crates/hir_ty/src/traits/chalk/mapping.rs b/crates/hir_ty/src/traits/chalk/mapping.rs index 452b357e8..3a5800885 100644 --- a/crates/hir_ty/src/traits/chalk/mapping.rs +++ b/crates/hir_ty/src/traits/chalk/mapping.rs @@ -220,8 +220,8 @@ impl ToChalk for GenericArg { type Chalk = chalk_ir::GenericArg; fn to_chalk(self, db: &dyn HirDatabase) -> Self::Chalk { - match self.interned { - crate::GenericArgData::Ty(ty) => ty.to_chalk(db).cast(&Interner), + match self.interned() { + crate::GenericArgData::Ty(ty) => ty.clone().to_chalk(db).cast(&Interner), } } @@ -249,7 +249,7 @@ impl ToChalk for Substitution { parameters: chalk_ir::Substitution, ) -> Substitution { let tys = parameters.iter(&Interner).map(|p| from_chalk(db, p.clone())).collect(); - Substitution(tys) + Substitution::intern(tys) } } @@ -546,7 +546,7 @@ pub(super) fn generic_predicate_to_inline_bound( // have the expected self type return None; } - let args_no_self = trait_ref.substitution.interned(&Interner)[1..] + let args_no_self = trait_ref.substitution.interned()[1..] .iter() .map(|ty| ty.clone().to_chalk(db).cast(&Interner)) .collect(); @@ -558,7 +558,7 @@ pub(super) fn generic_predicate_to_inline_bound( return None; } let trait_ = projection_ty.trait_(db); - let args_no_self = projection_ty.substitution.interned(&Interner)[1..] + let args_no_self = projection_ty.substitution.interned()[1..] .iter() .map(|ty| ty.clone().to_chalk(db).cast(&Interner)) .collect(); -- cgit v1.2.3