Skip to content

Commit b777317

Browse files
Auto merge of #144702 - compiler-errors:stall-const-arg-has-type, r=<try>
stall `ConstArgHasType` in `compute_goal_fast_path`
2 parents e5e79f8 + 585eac8 commit b777317

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

compiler/rustc_trait_selection/src/solve/delegate.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,13 @@ impl<'tcx> rustc_next_trait_solver::delegate::SolverDelegate for SolverDelegate<
135135
None
136136
}
137137
}
138+
ty::PredicateKind::Clause(ty::ClauseKind::ConstArgHasType(ct, _)) => {
139+
if self.shallow_resolve_const(ct).is_ct_infer() {
140+
Some(Certainty::AMBIGUOUS)
141+
} else {
142+
None
143+
}
144+
}
138145
ty::PredicateKind::Clause(ty::ClauseKind::WellFormed(arg)) => {
139146
let arg = self.shallow_resolve_term(arg);
140147
if arg.is_trivially_wf(self.tcx) {

0 commit comments

Comments
 (0)