diff options
| author | Michael Goulet <michael@errs.io> | 2025-07-30 20:30:17 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-07-30 20:30:17 +0000 |
| commit | 585eac88c8275ec336f730b7b715cc573a755b55 (patch) | |
| tree | dd72b95b671bbd5bfa814c07a43c0530daa20167 | |
| parent | e5e79f8bd428d0b8d26e8240d718b134ef297459 (diff) | |
| download | rust-585eac88c8275ec336f730b7b715cc573a755b55.tar.gz rust-585eac88c8275ec336f730b7b715cc573a755b55.zip | |
stall ConstArgHasType in compute_goal_fast_path
| -rw-r--r-- | compiler/rustc_trait_selection/src/solve/delegate.rs | 7 |
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) { |
