Skip to content

Commit

Permalink
Type generalization should not look at opaque type in coherence
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Nov 21, 2022
1 parent 11ae334 commit 7301cd7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions compiler/rustc_infer/src/infer/combine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T>(
Expand Down

0 comments on commit 7301cd7

Please sign in to comment.