diff options
| author | Yuki Okushi <yuki.okushi@huawei.com> | 2021-10-19 02:33:38 +0900 |
|---|---|---|
| committer | Yuki Okushi <yuki.okushi@huawei.com> | 2021-10-19 02:33:38 +0900 |
| commit | e2453dc2ff8ea5984b9eba40af8f8d13ee4e5da5 (patch) | |
| tree | 28bb99c37a42ff1a477db1ee4b26b2ed88a321b1 /compiler | |
| parent | 5dab47dcd8267b8769421b46532414ec36d625e3 (diff) | |
| download | rust-e2453dc2ff8ea5984b9eba40af8f8d13ee4e5da5.tar.gz rust-e2453dc2ff8ea5984b9eba40af8f8d13ee4e5da5.zip | |
Revert "Rollup merge of #86011 - tlyu:correct-sized-bound-spans, r=estebank"
This reverts commit 36a1076d24697621a3bb67ef654b4eb79647aa54, reversing changes made to e1e9319d93aea755c444c8f8ff863b0936d7a4b6.
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_typeck/src/bounds.rs | 9 |
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() } } |
