]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs
Rollup merge of #96415 - ehuss:git-io, r=bjorn3
[rust.git] / compiler / rustc_trait_selection / src / traits / error_reporting / mod.rs
index 50e4fafdd6c829c44fe8212e244993f5689a0b3b..082402a38e3f5db45813d5078fa7456103d30e85 100644 (file)
@@ -1727,6 +1727,7 @@ fn type_category(tcx: TyCtxt<'_>, t: Ty<'_>) -> Option<u32> {
         } else if cat_a == cat_b {
             match (a.kind(), b.kind()) {
                 (ty::Adt(def_a, _), ty::Adt(def_b, _)) => def_a == def_b,
+                (ty::Foreign(def_a), ty::Foreign(def_b)) => def_a == def_b,
                 // Matching on references results in a lot of unhelpful
                 // suggestions, so let's just not do that for now.
                 //