about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-02-20 22:55:07 +0000
committerbors <bors@rust-lang.org>2024-02-20 22:55:07 +0000
commit2dc0170233689435f988579a2080f27b02027d21 (patch)
treeae3169e55db5932a1b589728ce6c0c90133b237d /src
parentbb594538fc6e84213a6b8d5e165442570aa48923 (diff)
parentc03f61ba698e0e4a8de5fab63c4d4d63c0805dfd (diff)
downloadrust-2dc0170233689435f988579a2080f27b02027d21.tar.gz
rust-2dc0170233689435f988579a2080f27b02027d21.zip
Auto merge of #121356 - matthiaskrgr:rollup-d80af2s, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #119203 (Correct the simd_masked_{load,store} intrinsic docs)
 - #121277 (Refactor trait implementations in `core::convert::num`.)
 - #121322 (Don't ICE when hitting overflow limit in fulfillment loop in next solver)
 - #121323 (Don't use raw parameter types in `find_builder_fn`)
 - #121344 (Expand weak alias types before collecting constrained/referenced late bound regions + refactorings)
 - #121350 (Fix stray trait mismatch in `resolve_associated_item` for `AsyncFn`)
 - #121352 (docs: add missing "the" to `str::strip_prefix` doc)

Failed merges:

 - #121340 (bootstrap: apply most of clippy's suggestions)

r? `@ghost`
`@rustbot` modify labels: rollup
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()