diff options
| author | bors <bors@rust-lang.org> | 2013-03-11 04:27:48 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-03-11 04:27:48 -0700 |
| commit | 51cdca0bf0d3efc554c1815df9306ea10e881a14 (patch) | |
| tree | 250354cf3cd8fe9af0de4e0d8434c99a50742c75 /src/libsyntax/fold.rs | |
| parent | 58618fb8cfd791a930261ff68ae6bc77e0bc4412 (diff) | |
| parent | 070137ce905d0177e8d112385f1d8dc7b2407006 (diff) | |
| download | rust-51cdca0bf0d3efc554c1815df9306ea10e881a14.tar.gz rust-51cdca0bf0d3efc554c1815df9306ea10e881a14.zip | |
auto merge of #5122 : sanxiyn/rust/vec-match-tail-2, r=nikomatsakis
Incorporated @nikomatsakis's comments from #4748. Fix #4635.
Diffstat (limited to 'src/libsyntax/fold.rs')
| -rw-r--r-- | src/libsyntax/fold.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libsyntax/fold.rs b/src/libsyntax/fold.rs index b8371c9e8d9..2a5fe788770 100644 --- a/src/libsyntax/fold.rs +++ b/src/libsyntax/fold.rs @@ -416,10 +416,11 @@ pub fn noop_fold_pat(p: &pat_, fld: @ast_fold) -> pat_ { pat_range(e1, e2) => { pat_range(fld.fold_expr(e1), fld.fold_expr(e2)) }, - pat_vec(ref elts, ref tail) => { + pat_vec(ref before, ref slice, ref after) => { pat_vec( - elts.map(|x| fld.fold_pat(*x)), - tail.map(|tail| fld.fold_pat(*tail)) + before.map(|x| fld.fold_pat(*x)), + slice.map(|x| fld.fold_pat(*x)), + after.map(|x| fld.fold_pat(*x)) ) } } |
