Skip to content

Commit

Permalink
Auto merge of #1066 - RalfJung:slice-match, r=RalfJung
Browse files Browse the repository at this point in the history
slice matching overflow got fixed
  • Loading branch information
bors committed Nov 20, 2019
2 parents 11603c4 + f16f891 commit 6138794
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3e525e3f6d9e85d54fa4c49b52df85aa0c990100
b9cf5417892ef242c783ef963deff5436205b0f6
7 changes: 2 additions & 5 deletions tests/run-pass/issue-17877.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
//ignore-windows: Causes a stack overflow?!? Likely a rustc bug: https://github.com/rust-lang/rust/issues/53820
//FIXME: Once that bug is fixed, increase the size to 16*1024 and enable on all platforms.

#![feature(slice_patterns)]

fn main() {
assert_eq!(match [0u8; 1024] {
assert_eq!(match [0u8; 16*1024] {
_ => 42_usize,
}, 42_usize);

assert_eq!(match [0u8; 1024] {
assert_eq!(match [0u8; 16*1024] {
[1, ..] => 0_usize,
[0, ..] => 1_usize,
_ => 2_usize
Expand Down

0 comments on commit 6138794

Please sign in to comment.