Skip to content

Commit f16f891

Browse files
committed
slice matching overflow got fixed
1 parent 11603c4 commit f16f891

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3e525e3f6d9e85d54fa4c49b52df85aa0c990100
1+
b9cf5417892ef242c783ef963deff5436205b0f6

tests/run-pass/issue-17877.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
//ignore-windows: Causes a stack overflow?!? Likely a rustc bug: https://github.com/rust-lang/rust/issues/53820
2-
//FIXME: Once that bug is fixed, increase the size to 16*1024 and enable on all platforms.
3-
41
#![feature(slice_patterns)]
52

63
fn main() {
7-
assert_eq!(match [0u8; 1024] {
4+
assert_eq!(match [0u8; 16*1024] {
85
_ => 42_usize,
96
}, 42_usize);
107

11-
assert_eq!(match [0u8; 1024] {
8+
assert_eq!(match [0u8; 16*1024] {
129
[1, ..] => 0_usize,
1310
[0, ..] => 1_usize,
1411
_ => 2_usize

0 commit comments

Comments
 (0)