Skip to content

Commit 7f3af72

Browse files
Use ty::OpaqueTy everywhere
1 parent 918ede6 commit 7f3af72

File tree

55 files changed

+156
-118
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+156
-118
lines changed

compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,8 +697,8 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
697697
.map_bound(|p| p.predicates),
698698
None,
699699
),
700-
ty::Opaque(did, substs) => {
701-
find_fn_kind_from_did(tcx.bound_explicit_item_bounds(*did), Some(*substs))
700+
ty::Opaque(ty::OpaqueTy { def_id, substs }) => {
701+
find_fn_kind_from_did(tcx.bound_explicit_item_bounds(*def_id), Some(*substs))
702702
}
703703
ty::Closure(_, substs) => match substs.as_closure().kind() {
704704
ty::ClosureKind::Fn => Some(hir::Mutability::Not),

compiler/rustc_borrowck/src/diagnostics/region_errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
504504
let ErrorConstraintInfo { outlived_fr, span, .. } = errci;
505505

506506
let mut output_ty = self.regioncx.universal_regions().unnormalized_output_ty;
507-
if let ty::Opaque(def_id, _) = *output_ty.kind() {
507+
if let ty::Opaque(ty::OpaqueTy { def_id, substs: _ }) = *output_ty.kind() {
508508
output_ty = self.infcx.tcx.type_of(def_id)
509509
};
510510

compiler/rustc_const_eval/src/interpret/intrinsics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ pub(crate) fn eval_nullary_intrinsic<'tcx>(
8383
ConstValue::from_machine_usize(adt.variants().len() as u64, &tcx)
8484
}
8585
ty::Projection(_)
86-
| ty::Opaque(_, _)
86+
| ty::Opaque(ty::OpaqueTy { def_id: _, substs: _ })
8787
| ty::Param(_)
8888
| ty::Placeholder(_)
8989
| ty::Infer(_) => throw_inval!(TooGeneric),

compiler/rustc_const_eval/src/transform/validate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
241241
};
242242

243243
let kind = match parent_ty.ty.kind() {
244-
&ty::Opaque(def_id, substs) => {
244+
&ty::Opaque(ty::OpaqueTy { def_id, substs }) => {
245245
self.tcx.bound_type_of(def_id).subst(self.tcx, substs).kind()
246246
}
247247
kind => kind,

compiler/rustc_const_eval/src/util/type_name.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl<'tcx> Printer<'tcx> for AbsolutePathPrinter<'tcx> {
5858
// Types with identity (print the module path).
5959
ty::Adt(ty::AdtDef(Interned(&ty::AdtDefData { did: def_id, .. }, _)), substs)
6060
| ty::FnDef(def_id, substs)
61-
| ty::Opaque(def_id, substs)
61+
| ty::Opaque(ty::OpaqueTy { def_id, substs })
6262
| ty::Projection(ty::ProjectionTy { item_def_id: def_id, substs })
6363
| ty::Closure(def_id, substs)
6464
| ty::Generator(def_id, substs, _) => self.print_def_path(def_id, substs),

compiler/rustc_hir_analysis/src/check/check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1440,7 +1440,7 @@ fn opaque_type_cycle_error(tcx: TyCtxt<'_>, def_id: LocalDefId, span: Span) -> E
14401440
impl<'tcx> ty::visit::TypeVisitor<'tcx> for OpaqueTypeCollector {
14411441
fn visit_ty(&mut self, t: Ty<'tcx>) -> ControlFlow<Self::BreakTy> {
14421442
match *t.kind() {
1443-
ty::Opaque(def, _) => {
1443+
ty::Opaque(ty::OpaqueTy { def_id: def, substs: _ }) => {
14441444
self.0.push(def);
14451445
ControlFlow::CONTINUE
14461446
}

compiler/rustc_hir_analysis/src/collect/type_of.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ fn find_opaque_ty_constraints_for_tait(tcx: TyCtxt<'_>, def_id: LocalDefId) -> T
666666

667667
let hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
668668
let scope = tcx.hir().get_defining_scope(hir_id);
669-
let mut locator = ConstraintLocator { def_id: def_id, tcx, found: None, typeck_types: vec![] };
669+
let mut locator = ConstraintLocator { def_id, tcx, found: None, typeck_types: vec![] };
670670

671671
debug!(?scope);
672672

@@ -803,7 +803,7 @@ fn find_opaque_ty_constraints_for_rpit(
803803
if let Some(concrete) = concrete {
804804
let scope = tcx.hir().local_def_id_to_hir_id(owner_def_id);
805805
debug!(?scope);
806-
let mut locator = ConstraintChecker { def_id: def_id, tcx, found: concrete };
806+
let mut locator = ConstraintChecker { def_id, tcx, found: concrete };
807807

808808
match tcx.hir().get(scope) {
809809
Node::Item(it) => intravisit::walk_item(&mut locator, it),

compiler/rustc_hir_analysis/src/variance/constraints.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ impl<'a, 'tcx> ConstraintContext<'a, 'tcx> {
253253
self.add_constraints_from_invariant_substs(current, data.substs, variance);
254254
}
255255

256-
ty::Opaque(_, substs) => {
256+
ty::Opaque(ty::OpaqueTy { def_id: _, substs }) => {
257257
self.add_constraints_from_invariant_substs(current, substs, variance);
258258
}
259259

compiler/rustc_hir_typeck/src/_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
518518

519519
let substs = sig.output().walk().find_map(|arg| {
520520
if let ty::GenericArgKind::Type(ty) = arg.unpack()
521-
&& let ty::Opaque(def_id, substs) = *ty.kind()
521+
&& let ty::Opaque(ty::OpaqueTy { def_id, substs }) = *ty.kind()
522522
&& def_id == rpit_def_id
523523
{
524524
Some(substs)

compiler/rustc_hir_typeck/src/cast.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
119119
ty::Foreign(..) => Some(PointerKind::Thin),
120120
// We should really try to normalize here.
121121
ty::Projection(pi) => Some(PointerKind::OfProjection(pi)),
122-
ty::Opaque(def_id, substs) => Some(PointerKind::OfOpaque(def_id, substs)),
122+
ty::Opaque(ty::OpaqueTy { def_id, substs }) => {
123+
Some(PointerKind::OfOpaque(def_id, substs))
124+
}
123125
ty::Param(p) => Some(PointerKind::OfParam(p)),
124126
// Insufficient type information.
125127
ty::Placeholder(..) | ty::Bound(..) | ty::Infer(_) => None,

compiler/rustc_hir_typeck/src/closure.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
167167
expected_ty: Ty<'tcx>,
168168
) -> (Option<ExpectedSig<'tcx>>, Option<ty::ClosureKind>) {
169169
match *expected_ty.kind() {
170-
ty::Opaque(def_id, substs) => self.deduce_signature_from_predicates(
170+
ty::Opaque(ty::OpaqueTy { def_id, substs }) => self.deduce_signature_from_predicates(
171171
self.tcx.bound_explicit_item_bounds(def_id).subst_iter_copied(self.tcx, substs),
172172
),
173173
ty::Dynamic(ref object_type, ..) => {
@@ -677,7 +677,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
677677
get_future_output(obligation.predicate, obligation.cause.span)
678678
})?
679679
}
680-
ty::Opaque(def_id, substs) => self
680+
ty::Opaque(ty::OpaqueTy { def_id, substs }) => self
681681
.tcx
682682
.bound_explicit_item_bounds(def_id)
683683
.subst_iter_copied(self.tcx, substs)

compiler/rustc_hir_typeck/src/coercion.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1805,7 +1805,7 @@ impl<'tcx, 'exprs, E: AsCoercionSite> CoerceMany<'tcx, 'exprs, E> {
18051805
{
18061806
let ty = <dyn AstConv<'_>>::ast_ty_to_ty(fcx, ty);
18071807
// Get the `impl Trait`'s `DefId`.
1808-
if let ty::Opaque(def_id, _) = ty.kind()
1808+
if let ty::Opaque(ty::OpaqueTy { def_id, substs: _ }) = ty.kind()
18091809
// Get the `impl Trait`'s `Item` so that we can get its trait bounds and
18101810
// get the `Trait`'s `DefId`.
18111811
&& let hir::ItemKind::OpaqueTy(hir::OpaqueTy { bounds, .. }) =

compiler/rustc_hir_typeck/src/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2391,7 +2391,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
23912391
ty::Param(param_ty) => {
23922392
self.point_at_param_definition(&mut err, param_ty);
23932393
}
2394-
ty::Opaque(_, _) => {
2394+
ty::Opaque(ty::OpaqueTy { def_id: _, substs: _ }) => {
23952395
self.suggest_await_on_field_access(&mut err, ident, base, base_ty.peel_refs());
23962396
}
23972397
_ => {}

compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
716716
if formal_ret.has_infer_types() {
717717
for ty in ret_ty.walk() {
718718
if let ty::subst::GenericArgKind::Type(ty) = ty.unpack()
719-
&& let ty::Opaque(def_id, _) = *ty.kind()
719+
&& let ty::Opaque(ty::OpaqueTy { def_id, substs: _ }) = *ty.kind()
720720
&& let Some(def_id) = def_id.as_local()
721721
&& self.opaque_type_origin(def_id, DUMMY_SP).is_some() {
722722
return None;

compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2124,7 +2124,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
21242124
}
21252125
}
21262126
}
2127-
ty::Opaque(new_def_id, _)
2127+
ty::Opaque(ty::OpaqueTy { def_id: new_def_id, substs: _ })
21282128
| ty::Closure(new_def_id, _)
21292129
| ty::FnDef(new_def_id, _) => {
21302130
def_id = new_def_id;

compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
174174
let fn_sig = substs.as_closure().sig();
175175
Some((DefIdOrName::DefId(def_id), fn_sig.output(), fn_sig.inputs().map_bound(|inputs| &inputs[1..])))
176176
}
177-
ty::Opaque(def_id, substs) => {
177+
ty::Opaque(ty::OpaqueTy { def_id, substs }) => {
178178
self.tcx.bound_item_bounds(def_id).subst(self.tcx, substs).iter().find_map(|pred| {
179179
if let ty::PredicateKind::Clause(ty::Clause::Projection(proj)) = pred.kind().skip_binder()
180180
&& Some(proj.projection_ty.item_def_id) == self.tcx.lang_items().fn_once_output()

compiler/rustc_hir_typeck/src/generator_interior/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ fn check_must_not_suspend_ty<'tcx>(
563563
}
564564
ty::Adt(def, _) => check_must_not_suspend_def(fcx.tcx, def.did(), hir_id, data),
565565
// FIXME: support adding the attribute to TAITs
566-
ty::Opaque(def, _) => {
566+
ty::Opaque(ty::OpaqueTy { def_id: def, substs: _ }) => {
567567
let mut has_emitted = false;
568568
for &(predicate, _) in fcx.tcx.explicit_item_bounds(def) {
569569
// We only look at the `DefId`, so it is safe to skip the binder here.

compiler/rustc_hir_typeck/src/writeback.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ impl<'cx, 'tcx> WritebackCx<'cx, 'tcx> {
546546
impl<'tcx> ty::TypeVisitor<'tcx> for RecursionChecker {
547547
type BreakTy = ();
548548
fn visit_ty(&mut self, t: Ty<'tcx>) -> ControlFlow<Self::BreakTy> {
549-
if let ty::Opaque(def_id, _) = *t.kind() {
549+
if let ty::Opaque(ty::OpaqueTy { def_id, substs: _ }) = *t.kind() {
550550
if def_id == self.def_id.to_def_id() {
551551
return ControlFlow::Break(());
552552
}

compiler/rustc_infer/src/infer/combine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ impl<'tcx> TypeRelation<'tcx> for Generalizer<'_, 'tcx> {
675675
// relatable.
676676
Ok(t)
677677
}
678-
ty::Opaque(def_id, substs) => {
678+
ty::Opaque(ty::OpaqueTy { def_id, substs }) => {
679679
let s = self.relate(substs, substs)?;
680680
Ok(if s == substs { t } else { self.infcx.tcx.mk_opaque(def_id, s) })
681681
}

compiler/rustc_infer/src/infer/equate.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,15 @@ impl<'tcx> TypeRelation<'tcx> for Equate<'_, '_, 'tcx> {
100100
self.fields.instantiate(a, RelationDir::EqTo, b_id, self.a_is_expected)?;
101101
}
102102

103-
(&ty::Opaque(a_def_id, _), &ty::Opaque(b_def_id, _)) if a_def_id == b_def_id => {
103+
(
104+
&ty::Opaque(ty::OpaqueTy { def_id: a_def_id, substs: _ }),
105+
&ty::Opaque(ty::OpaqueTy { def_id: b_def_id, substs: _ }),
106+
) if a_def_id == b_def_id => {
104107
self.fields.infcx.super_combine_tys(self, a, b)?;
105108
}
106-
(&ty::Opaque(did, ..), _) | (_, &ty::Opaque(did, ..))
107-
if self.fields.define_opaque_types && did.is_local() =>
109+
(&ty::Opaque(ty::OpaqueTy { def_id, substs: _ }), _)
110+
| (_, &ty::Opaque(ty::OpaqueTy { def_id, substs: _ }))
111+
if self.fields.define_opaque_types && def_id.is_local() =>
108112
{
109113
self.fields.obligations.extend(
110114
infcx

compiler/rustc_infer/src/infer/error_reporting/mod.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,9 @@ pub fn unexpected_hidden_region_diagnostic<'tcx>(
338338

339339
impl<'tcx> InferCtxt<'tcx> {
340340
pub fn get_impl_future_output_ty(&self, ty: Ty<'tcx>) -> Option<Ty<'tcx>> {
341+
// FIXME(alias): Merge these
341342
let (def_id, substs) = match *ty.kind() {
342-
ty::Opaque(def_id, substs) => (def_id, substs),
343+
ty::Opaque(ty::OpaqueTy { def_id, substs }) => (def_id, substs),
343344
ty::Projection(data)
344345
if self.tcx.def_kind(data.item_def_id) == DefKind::ImplTraitPlaceholder =>
345346
{
@@ -1729,8 +1730,9 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
17291730
TypeError::Sorts(values) => {
17301731
let extra = expected == found;
17311732
let sort_string = |ty: Ty<'tcx>, path: Option<PathBuf>| {
1733+
// FIXME(alias): Merge these
17321734
let mut s = match (extra, ty.kind()) {
1733-
(true, ty::Opaque(def_id, _)) => {
1735+
(true, ty::Opaque(ty::OpaqueTy { def_id, .. })) => {
17341736
let sm = self.tcx.sess.source_map();
17351737
let pos = sm.lookup_char_pos(self.tcx.def_span(*def_id).lo());
17361738
format!(
@@ -2383,7 +2385,10 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
23832385
// fn get_later<G, T>(g: G, dest: &mut T) -> impl FnOnce() + '_
23842386
// suggest:
23852387
// fn get_later<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'a
2386-
ty::Closure(_, _substs) | ty::Opaque(_, _substs) if return_impl_trait => {
2388+
ty::Closure(_, _substs)
2389+
| ty::Opaque(ty::OpaqueTy { def_id: _, substs: _substs })
2390+
if return_impl_trait =>
2391+
{
23872392
new_binding_suggestion(&mut err, type_param_span);
23882393
}
23892394
_ => {
@@ -2765,7 +2770,7 @@ impl TyCategory {
27652770
pub fn from_ty(tcx: TyCtxt<'_>, ty: Ty<'_>) -> Option<(Self, DefId)> {
27662771
match *ty.kind() {
27672772
ty::Closure(def_id, _) => Some((Self::Closure, def_id)),
2768-
ty::Opaque(def_id, _) => Some((Self::Opaque, def_id)),
2773+
ty::Opaque(ty::OpaqueTy { def_id, substs: _ }) => Some((Self::Opaque, def_id)),
27692774
ty::Generator(def_id, ..) => {
27702775
Some((Self::Generator(tcx.generator_kind(def_id).unwrap()), def_id))
27712776
}

compiler/rustc_infer/src/infer/error_reporting/suggest.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -486,12 +486,14 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
486486
_ if self.same_type_modulo_infer(last_expr_ty, expected_ty) => {
487487
StatementAsExpression::CorrectType
488488
}
489-
(ty::Opaque(last_def_id, _), ty::Opaque(exp_def_id, _))
490-
if last_def_id == exp_def_id =>
491-
{
492-
StatementAsExpression::CorrectType
493-
}
494-
(ty::Opaque(last_def_id, last_bounds), ty::Opaque(exp_def_id, exp_bounds)) => {
489+
(
490+
ty::Opaque(ty::OpaqueTy { def_id: last_def_id, substs: _ }),
491+
ty::Opaque(ty::OpaqueTy { def_id: exp_def_id, substs: _ }),
492+
) if last_def_id == exp_def_id => StatementAsExpression::CorrectType,
493+
(
494+
ty::Opaque(ty::OpaqueTy { def_id: last_def_id, substs: last_bounds }),
495+
ty::Opaque(ty::OpaqueTy { def_id: exp_def_id, substs: exp_bounds }),
496+
) => {
495497
debug!(
496498
"both opaque, likely future {:?} {:?} {:?} {:?}",
497499
last_def_id, last_bounds, exp_def_id, exp_bounds
@@ -507,7 +509,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
507509
(
508510
hir::ItemKind::OpaqueTy(hir::OpaqueTy { bounds: last_bounds, .. }),
509511
hir::ItemKind::OpaqueTy(hir::OpaqueTy { bounds: exp_bounds, .. }),
510-
) if std::iter::zip(*last_bounds, *exp_bounds).all(|(left, right)| {
512+
) if iter::zip(*last_bounds, *exp_bounds).all(|(left, right)| {
511513
match (left, right) {
512514
(
513515
hir::GenericBound::Trait(tl, ml),

compiler/rustc_infer/src/infer/lattice.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,13 @@ where
105105
Ok(v)
106106
}
107107

108-
(&ty::Opaque(a_def_id, _), &ty::Opaque(b_def_id, _)) if a_def_id == b_def_id => {
109-
infcx.super_combine_tys(this, a, b)
110-
}
111-
(&ty::Opaque(did, ..), _) | (_, &ty::Opaque(did, ..))
112-
if this.define_opaque_types() && did.is_local() =>
108+
(
109+
&ty::Opaque(ty::OpaqueTy { def_id: a_def_id, substs: _ }),
110+
&ty::Opaque(ty::OpaqueTy { def_id: b_def_id, substs: _ }),
111+
) if a_def_id == b_def_id => infcx.super_combine_tys(this, a, b),
112+
(&ty::Opaque(ty::OpaqueTy { def_id, substs: _ }), _)
113+
| (_, &ty::Opaque(ty::OpaqueTy { def_id, substs: _ }))
114+
if this.define_opaque_types() && def_id.is_local() =>
113115
{
114116
this.add_obligations(
115117
infcx

compiler/rustc_infer/src/infer/nll_relate/mod.rs

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -608,16 +608,20 @@ where
608608

609609
(&ty::Infer(ty::TyVar(vid)), _) => self.relate_ty_var((vid, b)),
610610

611-
(&ty::Opaque(a_def_id, _), &ty::Opaque(b_def_id, _)) if a_def_id == b_def_id => {
612-
infcx.super_combine_tys(self, a, b).or_else(|err| {
613-
self.tcx().sess.delay_span_bug(
614-
self.delegate.span(),
615-
"failure to relate an opaque to itself should result in an error later on",
616-
);
617-
if a_def_id.is_local() { self.relate_opaques(a, b) } else { Err(err) }
618-
})
619-
}
620-
(&ty::Opaque(did, ..), _) | (_, &ty::Opaque(did, ..)) if did.is_local() => {
611+
(
612+
&ty::Opaque(ty::OpaqueTy { def_id: a_def_id, substs: _ }),
613+
&ty::Opaque(ty::OpaqueTy { def_id: b_def_id, substs: _ }),
614+
) if a_def_id == b_def_id => infcx.super_combine_tys(self, a, b).or_else(|err| {
615+
self.tcx().sess.delay_span_bug(
616+
self.delegate.span(),
617+
"failure to relate an opaque to itself should result in an error later on",
618+
);
619+
if a_def_id.is_local() { self.relate_opaques(a, b) } else { Err(err) }
620+
}),
621+
(&ty::Opaque(ty::OpaqueTy { def_id, substs: _ }), _)
622+
| (_, &ty::Opaque(ty::OpaqueTy { def_id, substs: _ }))
623+
if def_id.is_local() =>
624+
{
621625
self.relate_opaques(a, b)
622626
}
623627

0 commit comments

Comments
 (0)