diff options
| author | Jubilee Young <workingjubilee@gmail.com> | 2021-05-27 14:36:45 -0700 |
|---|---|---|
| committer | Jubilee Young <workingjubilee@gmail.com> | 2021-06-03 20:49:33 -0700 |
| commit | 43bad44ff01dd5035b961b366e65f705241b428d (patch) | |
| tree | 502fd4b70c3a71c2102b7cfda8d9a10c1ed9b0de /src/test/ui/half-open-range-patterns/slice_pattern_syntax_problem2.rs | |
| parent | 45d9dd69a7724986f1b80cf9462323b48d4e2529 (diff) | |
| download | rust-43bad44ff01dd5035b961b366e65f705241b428d.tar.gz rust-43bad44ff01dd5035b961b366e65f705241b428d.zip | |
Reestablish feature gate for RangeFrom in slices
Diffstat (limited to 'src/test/ui/half-open-range-patterns/slice_pattern_syntax_problem2.rs')
| -rw-r--r-- | src/test/ui/half-open-range-patterns/slice_pattern_syntax_problem2.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/half-open-range-patterns/slice_pattern_syntax_problem2.rs b/src/test/ui/half-open-range-patterns/slice_pattern_syntax_problem2.rs new file mode 100644 index 00000000000..6e7df309491 --- /dev/null +++ b/src/test/ui/half-open-range-patterns/slice_pattern_syntax_problem2.rs @@ -0,0 +1,10 @@ +// run-pass + +fn main() { + let xs = [13, 1, 5, 2, 3, 1, 21, 8]; + if let [3..=14, ..] = xs { + /* this variant must pass for now, unfortunately. + * This test is included here to help inform a future plan for these. + */ + }; +} |
