about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-11-24 07:29:11 -0800
committerGitHub <noreply@github.com>2023-11-24 07:29:11 -0800
commitffacd5463a3cac1d8e9860f5f5d09af35ae76515 (patch)
treec9732fb5314802f36a55324ab76c64e1f6db96dc /compiler/rustc_trait_selection
parent7f974b9e07214dfe76dafa593c8b02eb8e8c14ab (diff)
parentd51ef5c1afc6491d9c224e12cc5c1e72a58bf81a (diff)
downloadrust-ffacd5463a3cac1d8e9860f5f5d09af35ae76515.tar.gz
rust-ffacd5463a3cac1d8e9860f5f5d09af35ae76515.zip
Rollup merge of #118210 - lcnr:intercrate-ambiguity-causes-uwu, r=compiler-errors
intercrate ambiguity causes: ignore candidates which don't apply

r? `@compiler-errors`
Diffstat (limited to 'compiler/rustc_trait_selection')
-rw-r--r--compiler/rustc_trait_selection/src/traits/coherence.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/coherence.rs b/compiler/rustc_trait_selection/src/traits/coherence.rs
index 9119792e324..f3993ec2566 100644
--- a/compiler/rustc_trait_selection/src/traits/coherence.rs
+++ b/compiler/rustc_trait_selection/src/traits/coherence.rs
@@ -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);