@@ -1064,14 +1064,13 @@ Fold the fields. `use_foldl` controls whether this is done
1064
1064
left-to-right (`true`) or right-to-left (`false`).
1065
1065
*/
1066
1066
pub fn cs_fold ( use_foldl : bool ,
1067
- f : & fn ( @ExtCtxt , Span ,
1068
- old : @Expr ,
1069
- self_f : @Expr ,
1070
- other_fs : & [ @Expr ] ) -> @Expr ,
1067
+ f : |@ExtCtxt , Span , @Expr , @Expr , & [ @Expr ] | -> @Expr ,
1071
1068
base : @Expr ,
1072
1069
enum_nonmatch_f : EnumNonMatchFunc ,
1073
- cx : @ExtCtxt , trait_span : Span ,
1074
- substructure : & Substructure ) -> @Expr {
1070
+ cx : @ExtCtxt ,
1071
+ trait_span : Span ,
1072
+ substructure : & Substructure )
1073
+ -> @Expr {
1075
1074
match * substructure. fields {
1076
1075
EnumMatching ( _, _, ref all_fields) | Struct ( ref all_fields) => {
1077
1076
if use_foldl {
@@ -1104,10 +1103,12 @@ f(cx, span, ~[self_1.method(__arg_1_1, __arg_2_1),
1104
1103
~~~
1105
1104
*/
1106
1105
#[ inline]
1107
- pub fn cs_same_method ( f : & fn ( @ExtCtxt , Span , ~[ @Expr ] ) -> @Expr ,
1106
+ pub fn cs_same_method ( f : | @ExtCtxt , Span , ~[ @Expr ] | -> @Expr ,
1108
1107
enum_nonmatch_f : EnumNonMatchFunc ,
1109
- cx : @ExtCtxt , trait_span : Span ,
1110
- substructure : & Substructure ) -> @Expr {
1108
+ cx : @ExtCtxt ,
1109
+ trait_span : Span ,
1110
+ substructure : & Substructure )
1111
+ -> @Expr {
1111
1112
match * substructure. fields {
1112
1113
EnumMatching ( _, _, ref all_fields) | Struct ( ref all_fields) => {
1113
1114
// call self_n.method(other_1_n, other_2_n, ...)
@@ -1136,11 +1137,13 @@ fields. `use_foldl` controls whether this is done left-to-right
1136
1137
*/
1137
1138
#[ inline]
1138
1139
pub fn cs_same_method_fold ( use_foldl : bool ,
1139
- f : & fn ( @ExtCtxt , Span , @Expr , @Expr ) -> @Expr ,
1140
+ f : | @ExtCtxt , Span , @Expr , @Expr | -> @Expr ,
1140
1141
base : @Expr ,
1141
1142
enum_nonmatch_f : EnumNonMatchFunc ,
1142
- cx : @ExtCtxt , trait_span : Span ,
1143
- substructure : & Substructure ) -> @Expr {
1143
+ cx : @ExtCtxt ,
1144
+ trait_span : Span ,
1145
+ substructure : & Substructure )
1146
+ -> @Expr {
1144
1147
cs_same_method (
1145
1148
|cx, span, vals| {
1146
1149
if use_foldl {
0 commit comments