about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2024-02-20 13:50:39 +0100
committerLeón Orell Valerian Liehr <me@fmease.dev>2024-02-20 17:31:54 +0100
commitda01cced15b1a59e5eb40bdf5bb0be9a143d4e5a (patch)
tree10995d02bb002ef6c6888570c2d4c1bad6dc491f /src
parent515d805a0e76b57853bf9e929a2e7b084c475824 (diff)
downloadrust-da01cced15b1a59e5eb40bdf5bb0be9a143d4e5a.tar.gz
rust-da01cced15b1a59e5eb40bdf5bb0be9a143d4e5a.zip
Expand weak alias types before collecting constrained and referenced late bound regions
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/clean/auto_trait.rs17
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()