mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
Expand weak alias types before collecting constrained and referenced late bound regions
This commit is contained in:
@@ -318,15 +318,14 @@ fn handle_lifetimes<'cx>(
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user