Skip to content

Commit 1c2a29e

Browse files
committed
Expand on a few comments
1 parent 5df6af4 commit 1c2a29e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/librustc_mir/hair/pattern/_match.rs

+6
Original file line numberDiff line numberDiff line change
@@ -1416,6 +1416,8 @@ fn slice_pat_covered_by_const<'tcx>(
14161416
if *t != tcx.types.u8 {
14171417
// FIXME(oli-obk): can't mix const patterns with slice patterns and get
14181418
// any sort of exhaustiveness/unreachable check yet
1419+
// This solely means that we don't lint about unreachable patterns, even if some
1420+
// are definitely unreachable.
14191421
return Ok(false);
14201422
}
14211423
let ptr = Pointer::new(id, offset);
@@ -1427,6 +1429,8 @@ fn slice_pat_covered_by_const<'tcx>(
14271429
if *t != tcx.types.u8 {
14281430
// FIXME(oli-obk): can't mix const patterns with slice patterns and get
14291431
// any sort of exhaustiveness/unreachable check yet
1432+
// This solely means that we don't lint about unreachable patterns, even if some
1433+
// are definitely unreachable.
14301434
return Ok(false);
14311435
}
14321436
assert_eq!(n.to_usize(&tcx).unwrap(), 0);
@@ -1437,6 +1441,8 @@ fn slice_pat_covered_by_const<'tcx>(
14371441
if *t != tcx.types.u8 {
14381442
// FIXME(oli-obk): can't mix const patterns with slice patterns and get
14391443
// any sort of exhaustiveness/unreachable check yet
1444+
// This solely means that we don't lint about unreachable patterns, even if some
1445+
// are definitely unreachable.
14401446
return Ok(false);
14411447
}
14421448
let n = n.to_usize(&tcx).unwrap();

0 commit comments

Comments
 (0)