mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Add Interner parameter to Binders::substitute
This commit is contained in:
parent
05eba0db3d
commit
30a339e038
14 changed files with 52 additions and 43 deletions
|
@ -712,7 +712,7 @@ pub(crate) fn inherent_impl_substs(
|
|||
let vars = TyBuilder::subst_for_def(db, impl_id)
|
||||
.fill_with_bound_vars(DebruijnIndex::INNERMOST, self_ty.binders.len(&Interner))
|
||||
.build();
|
||||
let self_ty_with_vars = db.impl_self_ty(impl_id).substitute(&vars);
|
||||
let self_ty_with_vars = db.impl_self_ty(impl_id).substitute(&Interner, &vars);
|
||||
let mut kinds = self_ty.binders.interned().to_vec();
|
||||
kinds.extend(
|
||||
iter::repeat(chalk_ir::WithKind::new(
|
||||
|
@ -774,7 +774,7 @@ fn transform_receiver_ty(
|
|||
AssocContainerId::ModuleId(_) => unreachable!(),
|
||||
};
|
||||
let sig = db.callable_item_signature(function_id.into());
|
||||
Some(sig.map(|s| s.params()[0].clone()).substitute(&substs))
|
||||
Some(sig.map(|s| s.params()[0].clone()).substitute(&Interner, &substs))
|
||||
}
|
||||
|
||||
pub fn implements_trait(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue