mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Merge #8409
8409: Various remaining fixes for Chalk IR move r=flodiebold a=flodiebold CC #8313 Co-authored-by: Florian Diebold <flodiebold@gmail.com>
This commit is contained in:
commit
3191a93185
15 changed files with 79 additions and 71 deletions
|
@ -202,12 +202,12 @@ impl TyExt for Ty {
|
|||
.map(|pred| pred.clone().substitute(&Interner, &substs))
|
||||
.filter(|wc| match &wc.skip_binders() {
|
||||
WhereClause::Implemented(tr) => {
|
||||
tr.self_type_parameter(&Interner) == self
|
||||
&tr.self_type_parameter(&Interner) == self
|
||||
}
|
||||
WhereClause::AliasEq(AliasEq {
|
||||
alias: AliasTy::Projection(proj),
|
||||
ty: _,
|
||||
}) => proj.self_type_parameter(&Interner) == self,
|
||||
}) => &proj.self_type_parameter(&Interner) == self,
|
||||
_ => false,
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
@ -293,3 +293,13 @@ impl ProjectionTyExt for ProjectionTy {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub trait TraitRefExt {
|
||||
fn hir_trait_id(&self) -> TraitId;
|
||||
}
|
||||
|
||||
impl TraitRefExt for TraitRef {
|
||||
fn hir_trait_id(&self) -> TraitId {
|
||||
from_chalk_trait_id(self.trait_id)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue