Expand weak alias types before collecting constrained and referenced late bound regions
This commit is contained in:
parent
515d805a0e
commit
da01cced15
6 changed files with 26 additions and 25 deletions
|
|
@ -318,15 +318,14 @@ where
|
|||
fn extract_for_generics(&self, pred: ty::Clause<'tcx>) -> FxHashSet<GenericParamDef> {
|
||||
let bound_predicate = pred.kind();
|
||||
let tcx = self.cx.tcx;
|
||||
let regions = match bound_predicate.skip_binder() {
|
||||
ty::ClauseKind::Trait(poly_trait_pred) => {
|
||||
tcx.collect_referenced_late_bound_regions(&bound_predicate.rebind(poly_trait_pred))
|
||||
}
|
||||
ty::ClauseKind::Projection(poly_proj_pred) => {
|
||||
tcx.collect_referenced_late_bound_regions(&bound_predicate.rebind(poly_proj_pred))
|
||||
}
|
||||
_ => return FxHashSet::default(),
|
||||
};
|
||||
let regions =
|
||||
match bound_predicate.skip_binder() {
|
||||
ty::ClauseKind::Trait(poly_trait_pred) => tcx
|
||||
.collect_referenced_late_bound_regions(bound_predicate.rebind(poly_trait_pred)),
|
||||
ty::ClauseKind::Projection(poly_proj_pred) => tcx
|
||||
.collect_referenced_late_bound_regions(bound_predicate.rebind(poly_proj_pred)),
|
||||
_ => return FxHashSet::default(),
|
||||
};
|
||||
|
||||
regions
|
||||
.into_iter()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue