We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d34e15e commit 12a1b55Copy full SHA for 12a1b55
compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs
@@ -66,6 +66,8 @@ struct ConstToPat<'tcx> {
66
}
67
68
/// This error type signals that we encountered a non-struct-eq situation.
69
+/// We will fall back to calling `PartialEq::eq` on such patterns,
70
+/// and exhaustiveness checking will consider them as matching nothing.
71
#[derive(Debug)]
72
struct FallbackToOpaqueConst;
73
@@ -411,6 +413,7 @@ impl<'tcx> ConstToPat<'tcx> {
411
413
let err = TypeNotStructural { span, non_sm_ty: *pointee_ty };
412
414
tcx.sess.emit_err(err);
415
416
+ tcx.sess.delay_span_bug(span, "`saw_const_match_error` set but no error?");
417
// We errored, so the pattern we generate is irrelevant.
418
PatKind::Wild
419
0 commit comments