about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--compiler/rustc_type_ir/src/fast_reject.rs4
-rw-r--r--compiler/rustc_type_ir/src/ty_kind.rs14
2 files changed, 10 insertions, 8 deletions
diff --git a/compiler/rustc_type_ir/src/fast_reject.rs b/compiler/rustc_type_ir/src/fast_reject.rs
index 718e13ffe94..fab4a099117 100644
--- a/compiler/rustc_type_ir/src/fast_reject.rs
+++ b/compiler/rustc_type_ir/src/fast_reject.rs
@@ -311,8 +311,8 @@ impl<I: Interner> DeepRejectCtxt<I> {
             }
             ty::FnPtr(obl_sig_tys, obl_hdr) => match k {
                 ty::FnPtr(impl_sig_tys, impl_hdr) => {
-                    let obl_sig_tys = obl_sig_tys.skip_binder().0;
-                    let impl_sig_tys = impl_sig_tys.skip_binder().0;
+                    let obl_sig_tys = obl_sig_tys.skip_binder().inputs_and_output;
+                    let impl_sig_tys = impl_sig_tys.skip_binder().inputs_and_output;
 
                     obl_hdr == impl_hdr
                         && obl_sig_tys.len() == impl_sig_tys.len()
diff --git a/compiler/rustc_type_ir/src/ty_kind.rs b/compiler/rustc_type_ir/src/ty_kind.rs
index 8640a601980..328b6739d97 100644
--- a/compiler/rustc_type_ir/src/ty_kind.rs
+++ b/compiler/rustc_type_ir/src/ty_kind.rs
@@ -928,7 +928,7 @@ impl<I: Interner> ty::Binder<I, FnSig<I>> {
     pub fn split(self) -> (ty::Binder<I, FnSigTys<I>>, FnHeader<I>) {
         let hdr =
             FnHeader { c_variadic: self.c_variadic(), safety: self.safety(), abi: self.abi() };
-        (self.map_bound(|sig| FnSigTys(sig.inputs_and_output)), hdr)
+        (self.map_bound(|sig| FnSigTys { inputs_and_output: sig.inputs_and_output }), hdr)
     }
 }
 
@@ -971,15 +971,17 @@ impl<I: Interner> fmt::Debug for FnSig<I> {
 #[derive_where(Clone, Copy, Debug, PartialEq, Eq, Hash; I: Interner)]
 #[cfg_attr(feature = "nightly", derive(TyEncodable, TyDecodable, HashStable_NoContext))]
 #[derive(TypeVisitable_Generic, TypeFoldable_Generic, Lift_Generic)]
-pub struct FnSigTys<I: Interner>(pub I::Tys);
+pub struct FnSigTys<I: Interner> {
+    pub inputs_and_output: I::Tys,
+}
 
 impl<I: Interner> FnSigTys<I> {
     pub fn inputs(self) -> I::FnInputTys {
-        self.0.inputs()
+        self.inputs_and_output.inputs()
     }
 
     pub fn output(self) -> I::Ty {
-        self.0.output()
+        self.inputs_and_output.output()
     }
 }
 
@@ -987,7 +989,7 @@ impl<I: Interner> ty::Binder<I, FnSigTys<I>> {
     // Used to combine the two fields in `TyKind::FnPtr` into a single value.
     pub fn with(self, hdr: FnHeader<I>) -> ty::Binder<I, FnSig<I>> {
         self.map_bound(|sig_tys| FnSig {
-            inputs_and_output: sig_tys.0,
+            inputs_and_output: sig_tys.inputs_and_output,
             c_variadic: hdr.c_variadic,
             safety: hdr.safety,
             abi: hdr.abi,
@@ -1006,7 +1008,7 @@ impl<I: Interner> ty::Binder<I, FnSigTys<I>> {
     }
 
     pub fn inputs_and_output(self) -> ty::Binder<I, I::Tys> {
-        self.map_bound(|sig_tys| sig_tys.0)
+        self.map_bound(|sig_tys| sig_tys.inputs_and_output)
     }
 
     #[inline]