Skip to content

Commit 7301cd7

Browse files
committed
Type generalization should not look at opaque type in coherence
1 parent 11ae334 commit 7301cd7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/rustc_infer/src/infer/combine.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -548,8 +548,7 @@ impl<'tcx> TypeRelation<'tcx> for Generalizer<'_, 'tcx> {
548548
}
549549

550550
fn mark_ambiguous(&mut self) {
551-
// The generalizer always compares types against themselves,
552-
// and thus doesn't really take part in coherence.
551+
self.infcx.tcx.sess.delay_span_bug(self.cause.span, "opaque types are handled in `tys`");
553552
}
554553

555554
fn binders<T>(

0 commit comments

Comments
 (0)