Skip to content

Commit

Permalink
Correct comment on privately uninhabited pattern.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgillot committed May 25, 2023
1 parent d300bff commit 1895292
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_mir_build/src/thir/pattern/check_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,8 @@ impl<'p, 'tcx> MatchVisitor<'_, 'p, 'tcx> {
AdtDefinedHere { adt_def_span, ty, variants }
};

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

0 comments on commit 1895292

Please sign in to comment.