Actually use probes when needed and stop relying on existing outer probes
This commit is contained in:
parent
5776aec662
commit
7cf1c547c2
11 changed files with 349 additions and 334 deletions
|
@ -332,4 +332,9 @@ pub enum CandidateSource {
|
|||
/// }
|
||||
/// ```
|
||||
AliasBound,
|
||||
/// A candidate that is registered only during coherence to represent some
|
||||
/// yet-unknown impl that could be produced downstream without violating orphan
|
||||
/// rules.
|
||||
// FIXME: Merge this with the forced ambiguity candidates, so those don't use `Misc`.
|
||||
CoherenceUnknowable,
|
||||
}
|
||||
|
|
|
@ -141,10 +141,6 @@ pub enum ProbeKind<'tcx> {
|
|||
TryNormalizeNonRigid { result: QueryResult<'tcx> },
|
||||
/// Probe entered when normalizing the self ty during candidate assembly
|
||||
NormalizedSelfTyAssembly,
|
||||
/// Some candidate to prove the current goal.
|
||||
///
|
||||
/// FIXME: Remove this in favor of always using more strongly typed variants.
|
||||
MiscCandidate { name: &'static str, result: QueryResult<'tcx> },
|
||||
/// A candidate for proving a trait or alias-relate goal.
|
||||
TraitCandidate { source: CandidateSource, result: QueryResult<'tcx> },
|
||||
/// Used in the probe that wraps normalizing the non-self type for the unsize
|
||||
|
@ -154,4 +150,6 @@ pub enum ProbeKind<'tcx> {
|
|||
/// do a probe to find out what projection type(s) may be used to prove that
|
||||
/// the source type upholds all of the target type's object bounds.
|
||||
UpcastProjectionCompatibility,
|
||||
/// Try to unify an opaque type with an existing
|
||||
OpaqueTypeStorageLookup,
|
||||
}
|
||||
|
|
|
@ -112,8 +112,8 @@ impl<'a, 'b> ProofTreeFormatter<'a, 'b> {
|
|||
ProbeKind::UpcastProjectionCompatibility => {
|
||||
write!(self.f, "PROBING FOR PROJECTION COMPATIBILITY FOR UPCASTING:")
|
||||
}
|
||||
ProbeKind::MiscCandidate { name, result } => {
|
||||
write!(self.f, "CANDIDATE {name}: {result:?}")
|
||||
ProbeKind::OpaqueTypeStorageLookup => {
|
||||
write!(self.f, "PROBING FOR AN EXISTING OPAQUE:")
|
||||
}
|
||||
ProbeKind::TraitCandidate { source, result } => {
|
||||
write!(self.f, "CANDIDATE {source:?}: {result:?}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue