about summary refs log tree commit diff
path: root/src/test/run-pass/nested-patterns.rs
AgeCommit message (Collapse)AuthorLines
2014-08-01librustc: Forbid pattern bindings after `@`s, for memory safety.Patrick Walton-27/+0
This is an alternative to upgrading the way rvalues are handled in the borrow check. Making rvalues handled more like lvalues in the borrow check caused numerous problems related to double mutable borrows and rvalue scopes. Rather than come up with more borrow check rules to try to solve these problems, I decided to just forbid pattern bindings after `@`. This affected fewer than 10 lines of code in the compiler and libraries. This breaks code like: match x { y @ z => { ... } } match a { b @ Some(c) => { ... } } Change this code to use nested `match` or `let` expressions. For example: match x { y => { let z = y; ... } } match a { Some(c) => { let b = Some(c); ... } } Closes #14587. [breaking-change]
2014-06-23libsyntax: Disallow struct literals after `if`, `while`, `match`, andPatrick Walton-1/+1
`for...in`. Closes #14803. If you used a structure literal after one of these keywords, surround it in parentheses. [breaking-change]
2014-01-13librustc: Remove `@` pointer patterns from the languagePatrick Walton-5/+3
2013-11-28Register new snapshotsAlex Crichton-3/+3
2013-10-23register snapshotsDaniel Micay-0/+2
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-1/+1
Who doesn't like a massive renaming?
2013-09-30rpass: Remove usage of fmt!Alex Crichton-1/+1
2013-08-17Fix warnings it testsErick Tryzelaar-1/+1
2013-05-19Use assert_eq! rather than assert! where possibleCorey Richardson-2/+2
2013-03-29librustc: Remove `fail_unless!`Patrick Walton-3/+3
2013-03-07librustc: Convert all uses of `assert` over to `fail_unless!`Patrick Walton-3/+3
2013-02-22test: De-mut the test suite. rs=demutingPatrick Walton-3/+3
2013-02-13Remove die!, raplace invocations with fail! Issue #4524 pt 3Nick Desaulniers-1/+1
2013-02-01check-fast fallout from removing export, r=burningtreeGraydon Hoare-1/+1
2013-01-31Replace most invocations of fail keyword with die! macroNick Desaulniers-1/+1
2013-01-26testsuite: Eliminate uses of structural records from most run-pass testsTim Chevalier-5/+10
Except the pipes tests (that needs a snapshot)
2012-12-10Reliciense makefiles and testsuite. Yup.Graydon Hoare-0/+10
2012-08-06Convert alt to match. Stop parsing altBrian Anderson-1/+1
2012-08-05Switch alts to use arrowsBrian Anderson-2/+2
2012-03-26Bulk-edit mutable -> mut.Graydon Hoare-2/+2
2011-12-08Allow binding of nested patternsMarijn Haverbeke-0/+12
See src/test/run-pass/nested-patterns.rs for some examples. The syntax is boundvar@subpattern Which will match the subpattern as usual, but also bind boundvar to the whole matched value. Closes #838