about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-07-30 20:30:17 +0000
committerMichael Goulet <michael@errs.io>2025-07-30 20:30:17 +0000
commit585eac88c8275ec336f730b7b715cc573a755b55 (patch)
treedd72b95b671bbd5bfa814c07a43c0530daa20167
parente5e79f8bd428d0b8d26e8240d718b134ef297459 (diff)
downloadrust-585eac88c8275ec336f730b7b715cc573a755b55.tar.gz
rust-585eac88c8275ec336f730b7b715cc573a755b55.zip
stall ConstArgHasType in compute_goal_fast_path
-rw-r--r--compiler/rustc_trait_selection/src/solve/delegate.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/delegate.rs b/compiler/rustc_trait_selection/src/solve/delegate.rs
index 7426504e139..1fa2a690fcb 100644
--- a/compiler/rustc_trait_selection/src/solve/delegate.rs
+++ b/compiler/rustc_trait_selection/src/solve/delegate.rs
@@ -135,6 +135,13 @@ impl<'tcx> rustc_next_trait_solver::delegate::SolverDelegate for SolverDelegate<
                     None
                 }
             }
+            ty::PredicateKind::Clause(ty::ClauseKind::ConstArgHasType(ct, _)) => {
+                if self.shallow_resolve_const(ct).is_ct_infer() {
+                    Some(Certainty::AMBIGUOUS)
+                } else {
+                    None
+                }
+            }
             ty::PredicateKind::Clause(ty::ClauseKind::WellFormed(arg)) => {
                 let arg = self.shallow_resolve_term(arg);
                 if arg.is_trivially_wf(self.tcx) {