diff options
| author | lcnr <rust@lcnr.de> | 2022-04-25 08:51:26 +0200 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2022-04-25 08:51:26 +0200 |
| commit | 5594db097540d831cb7d98a662c7f3df7011411b (patch) | |
| tree | d93022d13277eece751774870abefadc3fc83a64 /compiler/rustc_trait_selection/src | |
| parent | 1f631e8e93681ddc6e62d6ba6065cac7c449534c (diff) | |
do not consider two extern types to be similar
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs index 50e4fafdd6c..082402a38e3 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs @@ -1727,6 +1727,7 @@ impl<'a, 'tcx> InferCtxtPrivExt<'a, 'tcx> for InferCtxt<'a, 'tcx> { } 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. // |
