Skip to content

Commit 66bd9eb

Browse files
committed
---
yaml --- r: 14498 b: refs/heads/try c: 0f054df h: refs/heads/master v: v3
1 parent 424c111 commit 66bd9eb

File tree

2 files changed

+32
-4
lines changed

2 files changed

+32
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: ac34cf96ad8f90dbeb979915508345cf200ab65f
5+
refs/heads/try: 0f054dfaeeedeb393715345b1739ad0e451ad08e
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/rustdoc/fold.rs

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ export default_seq_fold_impl;
1414
export default_seq_fold_type;
1515
export default_par_fold;
1616
export default_par_fold_mod;
17+
export default_par_fold_nmod;
1718
export default_any_fold;
1819
export default_any_fold_mod;
20+
export default_any_fold_nmod;
1921

2022
enum fold<T> = t<T>;
2123

@@ -85,7 +87,7 @@ fn default_any_fold<T:send>(ctxt: T) -> fold<T> {
8587
{|f, d| default_seq_fold_crate(f, d)},
8688
{|f, d| default_seq_fold_item(f, d)},
8789
{|f, d| default_any_fold_mod(f, d)},
88-
{|f, d| default_seq_fold_nmod(f, d)},
90+
{|f, d| default_any_fold_nmod(f, d)},
8991
{|f, d| default_seq_fold_fn(f, d)},
9092
{|f, d| default_seq_fold_const(f, d)},
9193
{|f, d| default_seq_fold_enum(f, d)},
@@ -119,7 +121,7 @@ fn default_par_fold<T:send>(ctxt: T) -> fold<T> {
119121
{|f, d| default_seq_fold_crate(f, d)},
120122
{|f, d| default_seq_fold_item(f, d)},
121123
{|f, d| default_par_fold_mod(f, d)},
122-
{|f, d| default_seq_fold_nmod(f, d)},
124+
{|f, d| default_par_fold_nmod(f, d)},
123125
{|f, d| default_seq_fold_fn(f, d)},
124126
{|f, d| default_seq_fold_const(f, d)},
125127
{|f, d| default_seq_fold_enum(f, d)},
@@ -185,13 +187,39 @@ fn default_par_fold_mod<T:send>(
185187
}
186188
}
187189

190+
fn default_any_fold_nmod<T:send>(
191+
fold: fold<T>,
192+
doc: doc::nmoddoc
193+
) -> doc::nmoddoc {
194+
{
195+
item: fold.fold_item(fold, doc.item),
196+
fns: util::anymap(doc.fns) {|fndoc|
197+
fold.fold_fn(fold, fndoc)
198+
}
199+
with doc
200+
}
201+
}
202+
188203
fn default_seq_fold_nmod<T>(
189204
fold: fold<T>,
190205
doc: doc::nmoddoc
191206
) -> doc::nmoddoc {
192207
{
193208
item: fold.fold_item(fold, doc.item),
194-
fns: vec::map(doc.fns) {|fndoc|
209+
fns: util::seqmap(doc.fns) {|fndoc|
210+
fold.fold_fn(fold, fndoc)
211+
}
212+
with doc
213+
}
214+
}
215+
216+
fn default_par_fold_nmod<T:send>(
217+
fold: fold<T>,
218+
doc: doc::nmoddoc
219+
) -> doc::nmoddoc {
220+
{
221+
item: fold.fold_item(fold, doc.item),
222+
fns: util::parmap(doc.fns) {|fndoc|
195223
fold.fold_fn(fold, fndoc)
196224
}
197225
with doc

0 commit comments

Comments
 (0)