summaryrefslogtreecommitdiff
path: root/src/librustc_mir/build/matches/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustc_mir/build/matches/mod.rs')
-rw-r--r--src/librustc_mir/build/matches/mod.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/librustc_mir/build/matches/mod.rs b/src/librustc_mir/build/matches/mod.rs
index 9ecbf748d7c..673ff9e86c4 100644
--- a/src/librustc_mir/build/matches/mod.rs
+++ b/src/librustc_mir/build/matches/mod.rs
@@ -238,6 +238,13 @@ pub struct MatchPair<'pat, 'tcx:'pat> {
// ... must match this pattern.
pattern: &'pat Pattern<'tcx>,
+
+ // HACK(eddyb) This is used to toggle whether a Slice pattern
+ // has had its length checked. This is only necessary because
+ // the "rest" part of the pattern right now has type &[T] and
+ // as such, it requires an Rvalue::Slice to be generated.
+ // See RFC 495 / issue #23121 for the eventual (proper) solution.
+ slice_len_checked: bool
}
#[derive(Clone, Debug, PartialEq)]