From 7301cd784437d289a34604a3c4145ed1801c902d Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Thu, 17 Nov 2022 09:49:18 +0000 Subject: [PATCH] Type generalization should not look at opaque type in coherence --- compiler/rustc_infer/src/infer/combine.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/rustc_infer/src/infer/combine.rs b/compiler/rustc_infer/src/infer/combine.rs index 53a19f8e4ec..f8234df871b 100644 --- a/compiler/rustc_infer/src/infer/combine.rs +++ b/compiler/rustc_infer/src/infer/combine.rs @@ -548,8 +548,7 @@ impl<'tcx> TypeRelation<'tcx> for Generalizer<'_, 'tcx> { } fn mark_ambiguous(&mut self) { - // The generalizer always compares types against themselves, - // and thus doesn't really take part in coherence. + self.infcx.tcx.sess.delay_span_bug(self.cause.span, "opaque types are handled in `tys`"); } fn binders(