Skip to content

Commit 5723632

Browse files
committed
Add note to address check_match errors
1 parent afdc38d commit 5723632

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/librustc_mir/build/matches/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -439,9 +439,9 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
439439
self.simplify_candidate(&mut candidate);
440440

441441
if !candidate.match_pairs.is_empty() {
442-
// Only abort compilation if no other errors have been emitted. This used to be a hard
443-
// error that wouldn't be reached because `hair::pattern::check_match::check_match`
444-
// wouldn't have let the compiler continue. In our tests this is only ever hit by
442+
// ICE if no other errors have been emitted. This used to be a hard error that wouldn't
443+
// be reached because `hair::pattern::check_match::check_match` wouldn't have let the
444+
// compiler continue. In our tests this is only ever hit by
445445
// `ui/consts/const-match-check.rs` with `--cfg eval1`, and that file already generates
446446
// a different error before hand.
447447
self.hir.tcx().sess.delay_span_bug(

src/librustc_mir/const_eval.rs

+1
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,7 @@ pub fn const_eval_raw_provider<'a, 'tcx>(
618618
let tables = tcx.typeck_tables_of(def_id);
619619

620620
// Do match-check before building MIR
621+
// FIXME(#59378) check_match may have errored but we're not checking for that anymore
621622
tcx.check_match(def_id);
622623

623624
if let hir::BodyOwnerKind::Const = tcx.hir().body_owner_kind_by_hir_id(id) {

0 commit comments

Comments
 (0)