Skip to content

Commit 6b0fae4

Browse files
committed
Replace DefineOpaqueTypes::No => DefineOpaqueTypes::Yes
1 parent 187d1af commit 6b0fae4

File tree

1 file changed

+4
-2
lines changed
  • compiler/rustc_hir_analysis/src/coherence

1 file changed

+4
-2
lines changed

compiler/rustc_hir_analysis/src/coherence/builtin.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ fn visit_implementation_of_dispatch_from_dyn(tcx: TyCtxt<'_>, impl_did: LocalDef
165165
use rustc_type_ir::TyKind::*;
166166
match (source.kind(), target.kind()) {
167167
(&Ref(r_a, _, mutbl_a), Ref(r_b, _, mutbl_b))
168-
if infcx.at(&cause, param_env).eq(DefineOpaqueTypes::No, r_a, *r_b).is_ok()
168+
// FIXME: No tests currently validate the behavior with DefineOpaqueTypes::Yes
169+
if infcx.at(&cause, param_env).eq(DefineOpaqueTypes::Yes, r_a, *r_b).is_ok()
169170
&& mutbl_a == *mutbl_b => {}
170171
(&RawPtr(tm_a), &RawPtr(tm_b)) if tm_a.mutbl == tm_b.mutbl => (),
171172
(&Adt(def_a, args_a), &Adt(def_b, args_b)) if def_a.is_struct() && def_b.is_struct() => {
@@ -204,7 +205,8 @@ fn visit_implementation_of_dispatch_from_dyn(tcx: TyCtxt<'_>, impl_did: LocalDef
204205
}
205206

206207
if let Ok(ok) =
207-
infcx.at(&cause, param_env).eq(DefineOpaqueTypes::No, ty_a, ty_b)
208+
// FIXME: No tests currently validate the behavior with DefineOpaqueTypes::Yes
209+
infcx.at(&cause, param_env).eq(DefineOpaqueTypes::Yes, ty_a, ty_b)
208210
{
209211
if ok.obligations.is_empty() {
210212
tcx.sess.emit_err(errors::DispatchFromDynZST {

0 commit comments

Comments
 (0)