1
Fork 0

Rollup merge of #118210 - lcnr:intercrate-ambiguity-causes-uwu, r=compiler-errors

intercrate ambiguity causes: ignore candidates which don't apply

r? `@compiler-errors`
This commit is contained in:
Michael Goulet 2023-11-24 07:29:11 -08:00 committed by GitHub
commit ffacd5463a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 41 additions and 6 deletions

View file

@ -1050,8 +1050,10 @@ impl<'a, 'tcx> ProofTreeVisitor<'tcx> for AmbiguityCausesVisitor<'a> {
let mut ambiguity_cause = None;
for cand in goal.candidates() {
// FIXME: boiiii, using string comparisions here sure is scuffed.
if let inspect::ProbeKind::MiscCandidate { name: "coherence unknowable", result: _ } =
cand.kind()
if let inspect::ProbeKind::MiscCandidate {
name: "coherence unknowable",
result: Ok(_),
} = cand.kind()
{
let lazily_normalize_ty = |ty: Ty<'tcx>| {
let mut fulfill_cx = <dyn TraitEngine<'tcx>>::new(infcx);