Skip to content

Commit

Permalink
Expand on a few comments
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Dec 13, 2018
1 parent 5df6af4 commit 1c2a29e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/librustc_mir/hair/pattern/_match.rs
Expand Up @@ -1416,6 +1416,8 @@ fn slice_pat_covered_by_const<'tcx>(
if *t != tcx.types.u8 {
// FIXME(oli-obk): can't mix const patterns with slice patterns and get
// any sort of exhaustiveness/unreachable check yet
// This solely means that we don't lint about unreachable patterns, even if some
// are definitely unreachable.
return Ok(false);
}
let ptr = Pointer::new(id, offset);
Expand All @@ -1427,6 +1429,8 @@ fn slice_pat_covered_by_const<'tcx>(
if *t != tcx.types.u8 {
// FIXME(oli-obk): can't mix const patterns with slice patterns and get
// any sort of exhaustiveness/unreachable check yet
// This solely means that we don't lint about unreachable patterns, even if some
// are definitely unreachable.
return Ok(false);
}
assert_eq!(n.to_usize(&tcx).unwrap(), 0);
Expand All @@ -1437,6 +1441,8 @@ fn slice_pat_covered_by_const<'tcx>(
if *t != tcx.types.u8 {
// FIXME(oli-obk): can't mix const patterns with slice patterns and get
// any sort of exhaustiveness/unreachable check yet
// This solely means that we don't lint about unreachable patterns, even if some
// are definitely unreachable.
return Ok(false);
}
let n = n.to_usize(&tcx).unwrap();
Expand Down

0 comments on commit 1c2a29e

Please sign in to comment.