Skip to content

Commit 1895292

Browse files
committed
Correct comment on privately uninhabited pattern.
1 parent d300bff commit 1895292

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_mir_build/src/thir/pattern/check_match.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,8 @@ impl<'p, 'tcx> MatchVisitor<'_, 'p, 'tcx> {
479479
AdtDefinedHere { adt_def_span, ty, variants }
480480
};
481481

482-
// Emit an extra note if the first uncovered witness is
483-
// visibly uninhabited anywhere in the current crate.
482+
// Emit an extra note if the first uncovered witness would be uninhabited
483+
// if we disregard visibility.
484484
let witness_1_is_privately_uninhabited =
485485
if cx.tcx.features().exhaustive_patterns
486486
&& let Some(witness_1) = witnesses.get(0)

0 commit comments

Comments
 (0)