1
Fork 0

Rollup merge of #124444 - compiler-errors:eval, r=lcnr

Record certainty of `evaluate_added_goals_and_make_canonical_response` call in candidate

Naming subject to bikeshedding, but I will need this when moving `select` to a proof tree visitor.

r? lcnr
This commit is contained in:
Matthias Krüger 2024-04-28 13:34:41 +02:00 committed by GitHub
commit a7771385e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 49 additions and 0 deletions

View file

@ -122,6 +122,12 @@ pub enum ProbeStep<'tcx> {
/// used whenever there are multiple candidates to prove the
/// current goalby .
NestedProbe(Probe<'tcx>),
/// A call to `EvalCtxt::evaluate_added_goals_make_canonical_response` with
/// `Certainty` was made. This is the certainty passed in, so it's not unified
/// with the certainty of the `try_evaluate_added_goals` that is done within;
/// if it's `Certainty::Yes`, then we can trust that the candidate is "finished"
/// and we didn't force ambiguity for some reason.
MakeCanonicalResponse { shallow_certainty: Certainty },
}
/// What kind of probe we're in. In case the probe represents a candidate, or

View file

@ -132,6 +132,9 @@ impl<'a, 'b> ProofTreeFormatter<'a, 'b> {
}
ProbeStep::EvaluateGoals(eval) => this.format_added_goals_evaluation(eval)?,
ProbeStep::NestedProbe(probe) => this.format_probe(probe)?,
ProbeStep::MakeCanonicalResponse { shallow_certainty } => {
writeln!(this.f, "EVALUATE GOALS AND MAKE RESPONSE: {shallow_certainty:?}")?
}
}
}
Ok(())