mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Lower impl trait to variables, move away from using placeholders where they don't belong
This commit is contained in:
parent
93aa166748
commit
16c6937447
9 changed files with 220 additions and 188 deletions
|
@ -65,7 +65,7 @@ impl CrateImplBlocks {
|
|||
}
|
||||
None => {
|
||||
let self_ty = db.impl_self_ty(impl_id);
|
||||
if let Some(self_ty_fp) = TyFingerprint::for_impl(&self_ty) {
|
||||
if let Some(self_ty_fp) = TyFingerprint::for_impl(&self_ty.value) {
|
||||
res.impls.entry(self_ty_fp).or_default().push(impl_id);
|
||||
}
|
||||
}
|
||||
|
@ -496,7 +496,7 @@ fn transform_receiver_ty(
|
|||
AssocContainerId::ContainerId(_) => unreachable!(),
|
||||
};
|
||||
let sig = db.callable_item_signature(function_id.into());
|
||||
Some(sig.params()[0].clone().subst(&substs))
|
||||
Some(sig.value.params()[0].clone().subst_bound_vars(&substs))
|
||||
}
|
||||
|
||||
pub fn implements_trait(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue