about summary refs log tree commit diff
path: root/compiler/rustc_infer
diff options
context:
space:
mode:
authorCameron Steffen <cam.steffen94@gmail.com>2025-09-16 17:08:14 -0500
committerCameron Steffen <cam.steffen94@gmail.com>2025-09-17 18:37:35 -0500
commit9ecca51bbe151c4ce0e374c46d1a0bfd1ec63d49 (patch)
tree4ad9a71977737e8a8d9ed2482b910d4ca0bc7c0d /compiler/rustc_infer
parenteec6bd9d69832f57341c6de6a93fa7b9f47e2111 (diff)
downloadrust-9ecca51bbe151c4ce0e374c46d1a0bfd1ec63d49.tar.gz
rust-9ecca51bbe151c4ce0e374c46d1a0bfd1ec63d49.zip
Remove ImplSubject
Diffstat (limited to 'compiler/rustc_infer')
-rw-r--r--compiler/rustc_infer/src/infer/at.rs19
1 files changed, 1 insertions, 18 deletions
diff --git a/compiler/rustc_infer/src/infer/at.rs b/compiler/rustc_infer/src/infer/at.rs
index ad19cdef4e7..70e3d7dc9fe 100644
--- a/compiler/rustc_infer/src/infer/at.rs
+++ b/compiler/rustc_infer/src/infer/at.rs
@@ -28,7 +28,7 @@
 use relate::lattice::{LatticeOp, LatticeOpKind};
 use rustc_middle::bug;
 use rustc_middle::ty::relate::solver_relating::RelateExt as NextSolverRelate;
-use rustc_middle::ty::{Const, ImplSubject, TypingMode};
+use rustc_middle::ty::{Const, TypingMode};
 
 use super::*;
 use crate::infer::relate::type_relating::TypeRelating;
@@ -304,23 +304,6 @@ impl<'a, 'tcx> At<'a, 'tcx> {
     }
 }
 
-impl<'tcx> ToTrace<'tcx> for ImplSubject<'tcx> {
-    fn to_trace(cause: &ObligationCause<'tcx>, a: Self, b: Self) -> TypeTrace<'tcx> {
-        match (a, b) {
-            (ImplSubject::Trait(trait_ref_a), ImplSubject::Trait(trait_ref_b)) => {
-                ToTrace::to_trace(cause, trait_ref_a, trait_ref_b)
-            }
-            (ImplSubject::Inherent(ty_a), ImplSubject::Inherent(ty_b)) => {
-                ToTrace::to_trace(cause, ty_a, ty_b)
-            }
-            (ImplSubject::Trait(_), ImplSubject::Inherent(_))
-            | (ImplSubject::Inherent(_), ImplSubject::Trait(_)) => {
-                bug!("can not trace TraitRef and Ty");
-            }
-        }
-    }
-}
-
 impl<'tcx> ToTrace<'tcx> for Ty<'tcx> {
     fn to_trace(cause: &ObligationCause<'tcx>, a: Self, b: Self) -> TypeTrace<'tcx> {
         TypeTrace {