diff options
author | Florian Diebold <[email protected]> | 2021-04-05 20:56:40 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-04-05 20:58:53 +0100 |
commit | b67148daea86d85d211c4243f22635d6ac7e1983 (patch) | |
tree | 0f666c5b917de8a0f2ebf5fba185500d153036f3 /crates/hir | |
parent | 2a83645e1bb01578c4bbe5f71418d354108dfd77 (diff) |
Substitution::prefix -> subst_prefix
I probably want to get rid of this function completely later.
Diffstat (limited to 'crates/hir')
-rw-r--r-- | crates/hir/src/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index 003821981..db4ebada4 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs | |||
@@ -55,6 +55,7 @@ use hir_ty::{ | |||
55 | autoderef, could_unify, | 55 | autoderef, could_unify, |
56 | method_resolution::{self, TyFingerprint}, | 56 | method_resolution::{self, TyFingerprint}, |
57 | primitive::UintTy, | 57 | primitive::UintTy, |
58 | subst_prefix, | ||
58 | traits::FnTrait, | 59 | traits::FnTrait, |
59 | AliasEq, AliasTy, BoundVar, CallableDefId, CallableSig, Canonical, CanonicalVarKinds, Cast, | 60 | AliasEq, AliasTy, BoundVar, CallableDefId, CallableSig, Canonical, CanonicalVarKinds, Cast, |
60 | DebruijnIndex, InEnvironment, Interner, QuantifiedWhereClause, Scalar, Solution, | 61 | DebruijnIndex, InEnvironment, Interner, QuantifiedWhereClause, Scalar, Solution, |
@@ -1503,7 +1504,7 @@ impl TypeParam { | |||
1503 | let krate = self.id.parent.module(db.upcast()).krate(); | 1504 | let krate = self.id.parent.module(db.upcast()).krate(); |
1504 | let ty = params.get(local_idx)?.clone(); | 1505 | let ty = params.get(local_idx)?.clone(); |
1505 | let subst = TyBuilder::type_params_subst(db, self.id.parent); | 1506 | let subst = TyBuilder::type_params_subst(db, self.id.parent); |
1506 | let ty = ty.substitute(&Interner, &subst.prefix(local_idx)); | 1507 | let ty = ty.substitute(&Interner, &subst_prefix(&subst, local_idx)); |
1507 | Some(Type::new_with_resolver_inner(db, krate, &resolver, ty)) | 1508 | Some(Type::new_with_resolver_inner(db, krate, &resolver, ty)) |
1508 | } | 1509 | } |
1509 | } | 1510 | } |