diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-02-20 19:35:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-20 19:35:41 +0100 |
| commit | 532b3eacb73401bf3d170b0470d1b5f877a7bad5 (patch) | |
| tree | 34df4bf677c465aa5419b7cd9b60417c47d428b7 /src/librustdoc | |
| parent | e3ff2a8e381f1aad544886fc105d53af3f9c335a (diff) | |
| parent | f515f99e9149b1f9c8d247b1d0fd543b1cd1fd37 (diff) | |
| download | rust-532b3eacb73401bf3d170b0470d1b5f877a7bad5.tar.gz rust-532b3eacb73401bf3d170b0470d1b5f877a7bad5.zip | |
Rollup merge of #121344 - fmease:lta-constr-by-input, r=oli-obk
Expand weak alias types before collecting constrained/referenced late bound regions + refactorings Fixes #114220. Follow-up to #120780. r? `@oli-obk`
Diffstat (limited to 'src/librustdoc')
| -rw-r--r-- | src/librustdoc/clean/auto_trait.rs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/librustdoc/clean/auto_trait.rs b/src/librustdoc/clean/auto_trait.rs index 8cc4201c3fc..fbc2c3c5af4 100644 --- a/src/librustdoc/clean/auto_trait.rs +++ b/src/librustdoc/clean/auto_trait.rs @@ -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() |
