about summary refs log tree commit diff
path: root/compiler/rustc_middle/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-06-13 09:47:42 -0400
committerMichael Goulet <michael@errs.io>2024-06-13 09:47:45 -0400
commitc8e42065f0f1d1a5cdb29c4279b1f2c25bc8737b (patch)
tree6369a76c1bee678d594102bac3cda018ff94b42b /compiler/rustc_middle/src
parenta2fb2ebc177cc4fa5933e72f3a81791e9b0b0083 (diff)
downloadrust-c8e42065f0f1d1a5cdb29c4279b1f2c25bc8737b.tar.gz
rust-c8e42065f0f1d1a5cdb29c4279b1f2c25bc8737b.zip
Address nits
- Remove the ValuePairs glob import
- Make DummyPairs -> ValuePairs::Dummy and make it bug more
- Fix WC
- Make interner return `impl IntoIterator`s
Diffstat (limited to 'compiler/rustc_middle/src')
-rw-r--r--compiler/rustc_middle/src/ty/context.rs8
-rw-r--r--compiler/rustc_middle/src/ty/predicate.rs4
2 files changed, 8 insertions, 4 deletions
diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs
index 849e10a952b..3651c990c97 100644
--- a/compiler/rustc_middle/src/ty/context.rs
+++ b/compiler/rustc_middle/src/ty/context.rs
@@ -263,7 +263,7 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
     fn bound_coroutine_hidden_types(
         self,
         def_id: DefId,
-    ) -> impl Iterator<Item = ty::EarlyBinder<'tcx, ty::Binder<'tcx, Ty<'tcx>>>> {
+    ) -> impl IntoIterator<Item = ty::EarlyBinder<'tcx, ty::Binder<'tcx, Ty<'tcx>>>> {
         self.bound_coroutine_hidden_types(def_id)
     }
 
@@ -286,14 +286,14 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
     fn item_bounds(
         self,
         def_id: DefId,
-    ) -> ty::EarlyBinder<'tcx, impl Iterator<Item = ty::Clause<'tcx>>> {
+    ) -> ty::EarlyBinder<'tcx, impl IntoIterator<Item = ty::Clause<'tcx>>> {
         self.item_bounds(def_id).map_bound(IntoIterator::into_iter)
     }
 
     fn super_predicates_of(
         self,
         def_id: DefId,
-    ) -> ty::EarlyBinder<'tcx, impl Iterator<Item = ty::Clause<'tcx>>> {
+    ) -> ty::EarlyBinder<'tcx, impl IntoIterator<Item = ty::Clause<'tcx>>> {
         ty::EarlyBinder::bind(
             self.super_predicates_of(def_id).instantiate_identity(self).predicates.into_iter(),
         )
@@ -315,7 +315,7 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
         )
     }
 
-    fn associated_type_def_ids(self, def_id: DefId) -> impl Iterator<Item = DefId> {
+    fn associated_type_def_ids(self, def_id: DefId) -> impl IntoIterator<Item = DefId> {
         self.associated_items(def_id)
             .in_definition_order()
             .filter(|assoc_item| matches!(assoc_item.kind, ty::AssocKind::Type))
diff --git a/compiler/rustc_middle/src/ty/predicate.rs b/compiler/rustc_middle/src/ty/predicate.rs
index 0f63490ea01..ae36f2624ca 100644
--- a/compiler/rustc_middle/src/ty/predicate.rs
+++ b/compiler/rustc_middle/src/ty/predicate.rs
@@ -49,6 +49,10 @@ impl<'tcx> rustc_type_ir::inherent::Predicate<TyCtxt<'tcx>> for Predicate<'tcx>
     fn is_coinductive(self, interner: TyCtxt<'tcx>) -> bool {
         self.is_coinductive(interner)
     }
+
+    fn allow_normalization(self) -> bool {
+        self.allow_normalization()
+    }
 }
 
 impl<'tcx> rustc_type_ir::inherent::IntoKind for Predicate<'tcx> {