about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2023-05-25 16:28:29 +0000
committerCamille GILLOT <gillot.camille@gmail.com>2023-05-25 16:28:29 +0000
commit18952929ff634866e94b763ae835c010c6e0db3e (patch)
tree609e9719095b525435a521e1b0f2b04a8969c82b
parentd300bffa4f0036e9138ef752610d08fc63f87a77 (diff)
downloadrust-18952929ff634866e94b763ae835c010c6e0db3e.tar.gz
rust-18952929ff634866e94b763ae835c010c6e0db3e.zip
Correct comment on privately uninhabited pattern.
-rw-r--r--compiler/rustc_mir_build/src/thir/pattern/check_match.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_mir_build/src/thir/pattern/check_match.rs b/compiler/rustc_mir_build/src/thir/pattern/check_match.rs
index 5559e8b3940..bd44cb43210 100644
--- a/compiler/rustc_mir_build/src/thir/pattern/check_match.rs
+++ b/compiler/rustc_mir_build/src/thir/pattern/check_match.rs
@@ -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)