about summary refs log tree commit diff
path: root/compiler/rustc_infer/src/infer/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-06-27 03:57:45 +0000
committerbors <bors@rust-lang.org>2025-06-27 03:57:45 +0000
commitdf32e15c56f582eb2bdde07711af6271f2ae660b (patch)
tree15588af39b55da6a8892d3cc13355b8bb9c4e800 /compiler/rustc_infer/src/infer/mod.rs
parente61dd437f33b5a640e67dc3628397689c664c17f (diff)
parent92e60e98af85efa3674840b329e706fbf6e3b212 (diff)
downloadrust-df32e15c56f582eb2bdde07711af6271f2ae660b.tar.gz
rust-df32e15c56f582eb2bdde07711af6271f2ae660b.zip
Auto merge of #142223 - compiler-errors:perf-wf, r=lcnr
Fast path for WF goals in new solver

Hopefully self-explanatory.
Diffstat (limited to 'compiler/rustc_infer/src/infer/mod.rs')
-rw-r--r--compiler/rustc_infer/src/infer/mod.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_infer/src/infer/mod.rs b/compiler/rustc_infer/src/infer/mod.rs
index fbc09327a4d..cc3ad921489 100644
--- a/compiler/rustc_infer/src/infer/mod.rs
+++ b/compiler/rustc_infer/src/infer/mod.rs
@@ -1044,6 +1044,13 @@ impl<'tcx> InferCtxt<'tcx> {
         }
     }
 
+    pub fn shallow_resolve_term(&self, term: ty::Term<'tcx>) -> ty::Term<'tcx> {
+        match term.kind() {
+            ty::TermKind::Ty(ty) => self.shallow_resolve(ty).into(),
+            ty::TermKind::Const(ct) => self.shallow_resolve_const(ct).into(),
+        }
+    }
+
     pub fn root_var(&self, var: ty::TyVid) -> ty::TyVid {
         self.inner.borrow_mut().type_variables().root_var(var)
     }