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_ty/src/display.rs | |
parent | 2a83645e1bb01578c4bbe5f71418d354108dfd77 (diff) |
Substitution::prefix -> subst_prefix
I probably want to get rid of this function completely later.
Diffstat (limited to 'crates/hir_ty/src/display.rs')
-rw-r--r-- | crates/hir_ty/src/display.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/crates/hir_ty/src/display.rs b/crates/hir_ty/src/display.rs index 91d657ce2..4ef8024d0 100644 --- a/crates/hir_ty/src/display.rs +++ b/crates/hir_ty/src/display.rs | |||
@@ -19,7 +19,7 @@ use hir_expand::name::Name; | |||
19 | 19 | ||
20 | use crate::{ | 20 | use crate::{ |
21 | db::HirDatabase, from_assoc_type_id, from_foreign_def_id, from_placeholder_idx, | 21 | db::HirDatabase, from_assoc_type_id, from_foreign_def_id, from_placeholder_idx, |
22 | lt_from_placeholder_idx, primitive, to_assoc_type_id, traits::chalk::from_chalk, | 22 | lt_from_placeholder_idx, primitive, subst_prefix, to_assoc_type_id, traits::chalk::from_chalk, |
23 | utils::generics, AdtId, AliasEq, AliasTy, CallableDefId, CallableSig, DomainGoal, GenericArg, | 23 | utils::generics, AdtId, AliasEq, AliasTy, CallableDefId, CallableSig, DomainGoal, GenericArg, |
24 | ImplTraitId, Interner, Lifetime, LifetimeData, LifetimeOutlives, Mutability, OpaqueTy, | 24 | ImplTraitId, Interner, Lifetime, LifetimeData, LifetimeOutlives, Mutability, OpaqueTy, |
25 | ProjectionTy, ProjectionTyExt, QuantifiedWhereClause, Scalar, TraitRef, Ty, TyExt, TyKind, | 25 | ProjectionTy, ProjectionTyExt, QuantifiedWhereClause, Scalar, TraitRef, Ty, TyExt, TyKind, |
@@ -484,9 +484,11 @@ impl HirDisplay for Ty { | |||
484 | default_from = i + 1; | 484 | default_from = i + 1; |
485 | } | 485 | } |
486 | (_, Some(default_parameter)) => { | 486 | (_, Some(default_parameter)) => { |
487 | let actual_default = default_parameter | 487 | let actual_default = |
488 | .clone() | 488 | default_parameter.clone().substitute( |
489 | .substitute(&Interner, ¶meters.prefix(i)); | 489 | &Interner, |
490 | &subst_prefix(parameters, i), | ||
491 | ); | ||
490 | if parameter.assert_ty_ref(&Interner) != &actual_default | 492 | if parameter.assert_ty_ref(&Interner) != &actual_default |
491 | { | 493 | { |
492 | default_from = i + 1; | 494 | default_from = i + 1; |