diff options
| author | bors <bors@rust-lang.org> | 2013-09-09 21:31:03 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-09-09 21:31:03 -0700 |
| commit | 7820fb5ca99785c4812ad32be80998a2a4fb4213 (patch) | |
| tree | cca8e780bad6ed4c09d5a07b914a7102e64eaa74 /src/libsyntax/ext | |
| parent | 8c7c0b41d7b1a3f240301387fa4152a060d532e4 (diff) | |
| parent | c11ee0fb6719e38820762308d67f70cee000bed8 (diff) | |
| download | rust-7820fb5ca99785c4812ad32be80998a2a4fb4213.tar.gz rust-7820fb5ca99785c4812ad32be80998a2a4fb4213.zip | |
auto merge of #9062 : blake2-ppc/rust/vec-iterator, r=alexcrichton
Visit the free functions of std::vec and reimplement or remove some. Most prominently, remove `each_permutation` and replace with two iterators, ElementSwaps and Permutations. Replace unzip, unzip_slice with an updated `unzip` that works with an iterator argument. Replace each_permutation with a Permutation iterator. The new permutation iterator is more efficient since it uses an algorithm that produces permutations in an order where each is only one element swap apart, including swapping back to the original state with one swap at the end. Unify the seldomly used functions `build`, `build_sized`, `build_sized_opt` into just one function `build`. Remove `equal_sizes`
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/deriving/generic.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/ext/deriving/generic.rs b/src/libsyntax/ext/deriving/generic.rs index 7050cfbedb7..8221be1bbcb 100644 --- a/src/libsyntax/ext/deriving/generic.rs +++ b/src/libsyntax/ext/deriving/generic.rs @@ -958,7 +958,7 @@ fn create_struct_pattern(cx: @ExtCtxt, // struct_type is definitely not Unknown, since struct_def.fields // must be nonempty to reach here let pattern = if struct_type == Record { - let field_pats = do vec::build |push| { + let field_pats = do vec::build(None) |push| { for (&pat, &(id, _)) in subpats.iter().zip(ident_expr.iter()) { // id is guaranteed to be Some push(ast::FieldPat { ident: id.unwrap(), pat: pat }) |
