diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2024-10-23 22:11:04 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-23 22:11:04 +0200 |
| commit | 6b70ff44bc99daf158bc004e0d2d828c57657897 (patch) | |
| tree | 3f21def929c1b6b70eaded6be68d1f61260a067b /compiler/rustc_middle | |
| parent | a144561608d73952011161f470de33e04d423d1d (diff) | |
| parent | 21d95fb7b29b108de74af101b9ebdf5e401088d5 (diff) | |
| download | rust-6b70ff44bc99daf158bc004e0d2d828c57657897.tar.gz rust-6b70ff44bc99daf158bc004e0d2d828c57657897.zip | |
Rollup merge of #131979 - compiler-errors:compare-pred-entail, r=fmease
Minor tweaks to `compare_impl_item.rs` 1. Stop using the `InstantiatedPredicates` struct for `hybrid_preds` in `compare_impl_item.rs`, since we never actually push anything into the `spans` part of it. 2. Remove redundant impl args and don't do useless identity substitution, prefer calling `instantiate_identity`.
Diffstat (limited to 'compiler/rustc_middle')
| -rw-r--r-- | compiler/rustc_middle/src/ty/generics.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/ty/generics.rs b/compiler/rustc_middle/src/ty/generics.rs index 660686f4aa2..63534a3d017 100644 --- a/compiler/rustc_middle/src/ty/generics.rs +++ b/compiler/rustc_middle/src/ty/generics.rs @@ -395,7 +395,9 @@ impl<'tcx> GenericPredicates<'tcx> { EarlyBinder::bind(self.predicates).iter_instantiated_copied(tcx, args) } - pub fn instantiate_own_identity(self) -> impl Iterator<Item = (Clause<'tcx>, Span)> { + pub fn instantiate_own_identity( + self, + ) -> impl Iterator<Item = (Clause<'tcx>, Span)> + DoubleEndedIterator + ExactSizeIterator { EarlyBinder::bind(self.predicates).iter_identity_copied() } |
