diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-04-05 20:59:25 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-04-05 20:59:25 +0100 |
commit | f25c1e7c6a119a1035ba226f0735a0d6667a5db8 (patch) | |
tree | 0f666c5b917de8a0f2ebf5fba185500d153036f3 /crates/hir | |
parent | 8c96a7d81e29061537d78b5670a3474cb136422d (diff) | |
parent | b67148daea86d85d211c4243f22635d6ac7e1983 (diff) |
Merge #8356
8356: Align more methods to Chalk r=flodiebold a=flodiebold
Related to #8313.
Move some inherent methods that don't exist in Chalk to an extension trait, remove some others.
Co-authored-by: Florian Diebold <[email protected]>
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 | } |