1
Fork 0

Only register candidate if it is associated w a shallow certainty

This commit is contained in:
Michael Goulet 2024-04-28 15:35:35 -04:00
parent 7cf1c547c2
commit 2eb7c8196b
4 changed files with 32 additions and 42 deletions

View file

@ -150,6 +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,
/// Try to unify an opaque type with an existing key in the storage.
OpaqueTypeStorageLookup { result: QueryResult<'tcx> },
}

View file

@ -112,8 +112,8 @@ impl<'a, 'b> ProofTreeFormatter<'a, 'b> {
ProbeKind::UpcastProjectionCompatibility => {
write!(self.f, "PROBING FOR PROJECTION COMPATIBILITY FOR UPCASTING:")
}
ProbeKind::OpaqueTypeStorageLookup => {
write!(self.f, "PROBING FOR AN EXISTING OPAQUE:")
ProbeKind::OpaqueTypeStorageLookup { result } => {
write!(self.f, "PROBING FOR AN EXISTING OPAQUE: {result:?}")
}
ProbeKind::TraitCandidate { source, result } => {
write!(self.f, "CANDIDATE {source:?}: {result:?}")