about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2021-10-20 04:35:17 +0900
committerGitHub <noreply@github.com>2021-10-20 04:35:17 +0900
commitd8b3764bd2ae7054dc6896fbd414d95ccb9da2a0 (patch)
tree7801fcefd4c31ca0bddf575c917d7e65b5063fa8 /compiler
parent7ceab9ef142a465c554bd96c3844accd425d3270 (diff)
parent101a81b807a20c2fb30508fd5a1103e1661e45ea (diff)
downloadrust-d8b3764bd2ae7054dc6896fbd414d95ccb9da2a0.tar.gz
rust-d8b3764bd2ae7054dc6896fbd414d95ccb9da2a0.zip
Rollup merge of #90025 - JohnTitor:revert-86011, r=estebank
Revert #86011 to fix an incorrect bound check

This reverts commit 36a1076d24697621a3bb67ef654b4eb79647aa54, reversing
changes made to e1e9319d93aea755c444c8f8ff863b0936d7a4b6.

Fixes #89935
r? ``@estebank``
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_typeck/src/bounds.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/rustc_typeck/src/bounds.rs b/compiler/rustc_typeck/src/bounds.rs
index ff04e07acc4..24474e163b9 100644
--- a/compiler/rustc_typeck/src/bounds.rs
+++ b/compiler/rustc_typeck/src/bounds.rs
@@ -64,16 +64,16 @@ impl<'tcx> Bounds<'tcx> {
             })
         });
 
-        self.region_bounds
-            .iter()
-            .map(|&(region_bound, span)| {
+        sized_predicate
+            .into_iter()
+            .chain(self.region_bounds.iter().map(|&(region_bound, span)| {
                 (
                     region_bound
                         .map_bound(|region_bound| ty::OutlivesPredicate(param_ty, region_bound))
                         .to_predicate(tcx),
                     span,
                 )
-            })
+            }))
             .chain(self.trait_bounds.iter().map(|&(bound_trait_ref, span, constness)| {
                 let predicate = bound_trait_ref.with_constness(constness).to_predicate(tcx);
                 (predicate, span)
@@ -83,7 +83,6 @@ impl<'tcx> Bounds<'tcx> {
                     .iter()
                     .map(|&(projection, span)| (projection.to_predicate(tcx), span)),
             )
-            .chain(sized_predicate.into_iter())
             .collect()
     }
 }