about summary refs log tree commit diff
path: root/src/test/run-pass/vec-matching.rs
AgeCommit message (Collapse)AuthorLines
2018-09-06Migrated slew of run-pass tests to various subdirectories of `ui/run-pass/`.Felix S. Klock II-167/+0
2018-03-20Stabilize slice patterns without `..`Vadim Petrochenkov-2/+0
Merge `feature(advanced_slice_patterns)` into `feature(slice_patterns)`
2016-10-26flatten nested slice patterns in HAIR constructionAriel Ben-Yehuda-0/+15
nested slice patterns have the same functionality as non-nested ones, so flatten them in HAIR construction. Fixes #26158.
2016-08-24Disable old trans access via -Z orbit, #[rustc_no_mir] or --disable-orbit.Eduard Burtescu-7/+0
2016-06-09implement RFC495 semantics for slice patternsAriel Ben-Yehuda-4/+73
non-MIR translation is still not supported for these and will happily ICE. This is a [breaking-change] for many uses of slice_patterns.
2015-04-08Remove pretty-expanded from failing testsAlex Crichton-1/+0
This commit removes pretty-expanded from all tests that wind up calling panic! one way or another now that its internals are unstable.
2015-03-27rollup merge of #23794: brson/slicegateAlex Crichton-0/+1
Conflicts: src/test/run-pass/issue-13027.rs
2015-03-27Feature gate *all* slice patterns. #23121Brian Anderson-0/+1
Until some backwards-compatibility hazards are fixed in #23121, these need to be unstable. [breaking-change]
2015-03-26Mass rename uint/int to usize/isizeAlex Crichton-1/+1
Now that support has been removed, all lingering use cases are renamed.
2015-03-23rustdoc: Replace no-pretty-expanded with pretty-expandedBrian Anderson-0/+2
Now that features must be declared expanded source often does not compile. This adds 'pretty-expanded' to a bunch of test cases that still work.
2015-01-30Remove all `i` suffixesTobias Bucher-8/+8
2014-10-29Rename fail! to panic!Steve Klabnik-1/+1
https://github.com/rust-lang/rfcs/pull/221 The current terminology of "task failure" often causes problems when writing or speaking about code. You often want to talk about the possibility of an operation that returns a Result "failing", but cannot because of the ambiguity with task failure. Instead, you have to speak of "the failing case" or "when the operation does not succeed" or other circumlocutions. Likewise, we use a "Failure" header in rustdoc to describe when operations may fail the task, but it would often be helpful to separate out a section describing the "Err-producing" case. We have been steadily moving away from task failure and toward Result as an error-handling mechanism, so we should optimize our terminology accordingly: Result-producing functions should be easy to describe. To update your code, rename any call to `fail!` to `panic!` instead. Assuming you have not created your own macro named `panic!`, this will work on UNIX based systems: grep -lZR 'fail!' . | xargs -0 -l sed -i -e 's/fail!/panic!/g' You can of course also do this by hand. [breaking-change]
2014-09-09rollup merge of #17054 : pcwalton/subslice-syntaxAlex Crichton-3/+3
2014-09-08librustc: Change the syntax of subslice matching to use postfix `..`Patrick Walton-3/+3
instead of prefix `..`. This breaks code that looked like: match foo { [ first, ..middle, last ] => { ... } } Change this code to: match foo { [ first, middle.., last ] => { ... } } RFC #55. Closes #16967. [breaking-change]
2014-09-08librustc: Feature gate subslice matching in non-tail positions.Patrick Walton-0/+2
This breaks code that uses the `..xs` form anywhere but at the end of a slice. For example: match foo { [ 1, ..xs, 2 ] [ ..xs, 1, 2 ] } Add the `#![feature(advanced_slice_patterns)]` gate to reenable the syntax. RFC #54. Closes #16951. [breaking-change]
2014-08-26Rebasing changesNick Cameron-1/+2
2014-08-26Use temp vars for implicit coercion to ^[T]Nick Cameron-3/+6
2014-06-29librustc: Remove the fallback to `int` for integers and `f64` forPatrick Walton-1/+1
floating point numbers for real. This will break code that looks like: let mut x = 0; while ... { x += 1; } println!("{}", x); Change that code to: let mut x = 0i; while ... { x += 1; } println!("{}", x); Closes #15201. [breaking-change]
2014-06-24librustc: Remove the fallback to `int` from typechecking.Niko Matsakis-7/+7
This breaks a fair amount of code. The typical patterns are: * `for _ in range(0, 10)`: change to `for _ in range(0u, 10)`; * `println!("{}", 3)`: change to `println!("{}", 3i)`; * `[1, 2, 3].len()`: change to `[1i, 2, 3].len()`. RFC #30. Closes #6023. [breaking-change]
2014-06-21Fix a #14731 regression in missing_constructor() for vector patternsJakub Wieczorek-0/+8
Fixes #15080.
2014-02-19librustc: Remove unique vector patterns from the language.Patrick Walton-11/+2
Preparatory work for removing unique vectors from the language, which is itself preparatory work for dynamically sized types.
2014-02-07Added tests to make tidyDerek Guenther-0/+10
2013-11-28Register new snapshotsAlex Crichton-8/+8
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-10/+10
Who doesn't like a massive renaming?
2013-09-30rpass: Remove usage of fmt!Alex Crichton-10/+10
2013-08-10Merge branch 'match' of https://github.com/msullivan/rust into rollupErick Tryzelaar-5/+26
2013-08-09Fix vector pattern matching. Closes #6909.Michael Sullivan-5/+26
2013-08-07Fix incorrect non-exhaustive matching for fixed length vecsStepan Koltsov-2/+2
Code like this is fixed now: ``` fn foo(p: [u8, ..4]) { match p { [a, b, c, d] => {} }; } ``` Invalid constructors are not reported as errors yet: ``` fn foo(p: [u8, ..4]) { match p { [_, _, _] => {} // this should be error [_, _, _, _, _, .._] => {} // and this _ => {} } } ``` Issue #8311 is partially fixed by this commit. Fixed-length arrays in let statement are not yet allowed: ``` let [a, b, c] = [1, 2, 3]; // still fails ```
2013-05-22test: Update tests to use the new syntax.Patrick Walton-5/+5
2013-05-19Use assert_eq! rather than assert! where possibleCorey Richardson-13/+13
2013-03-29librustc: Remove `fail_unless!`Patrick Walton-13/+13
2013-03-11Add one more test for vector destructuringSeo Sanghyeon-1/+42
2013-03-11Implement vector destructuring from tailSeo Sanghyeon-27/+7
2013-03-07librustc: Convert all uses of `assert` over to `fail_unless!`Patrick Walton-6/+6
2013-02-01check-fast fallout from removing export, r=burningtreeGraydon Hoare-1/+1
2013-01-07test: Fix check-fast for resolve changes. rs=bustagePatrick Walton-2/+2
2012-12-17Add support for destructuring vectors in match expressionsJakub Wieczorek-0/+33