From 1c2a29e29a56d449111a1f39beb901983e8b7ebc Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Thu, 13 Dec 2018 12:54:57 +0100 Subject: [PATCH] Expand on a few comments --- src/librustc_mir/hair/pattern/_match.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/librustc_mir/hair/pattern/_match.rs b/src/librustc_mir/hair/pattern/_match.rs index 1162f0ca86156..5cfcc16162ee2 100644 --- a/src/librustc_mir/hair/pattern/_match.rs +++ b/src/librustc_mir/hair/pattern/_match.rs @@ -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); @@ -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); @@ -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();