@@ -2844,15 +2844,16 @@ pub impl Parser {
2844
2844
( lifetimes, opt_vec:: take_vec ( result) )
2845
2845
}
2846
2846
2847
- fn parse_fn_decl ( & self , parse_arg_fn : & fn ( & Parser ) -> arg_or_capture_item )
2847
+ // parse the argument list and result type of a function declaration
2848
+ fn parse_fn_decl ( & self )
2848
2849
-> fn_decl
2849
2850
{
2850
2851
let args_or_capture_items: ~[ arg_or_capture_item ] =
2851
2852
self . parse_unspanned_seq (
2852
2853
& token:: LPAREN ,
2853
2854
& token:: RPAREN ,
2854
2855
seq_sep_trailing_disallowed ( token:: COMMA ) ,
2855
- parse_arg_fn
2856
+ |p| p . parse_arg ( )
2856
2857
) ;
2857
2858
2858
2859
let inputs = either:: lefts ( args_or_capture_items) ;
@@ -3081,7 +3082,7 @@ pub impl Parser {
3081
3082
// parse an item-position function declaration.
3082
3083
fn parse_item_fn ( & self , purity : purity , abis : AbiSet ) -> item_info {
3083
3084
let ( ident, generics) = self . parse_fn_header ( ) ;
3084
- let decl = self . parse_fn_decl ( |p| p . parse_arg ( ) ) ;
3085
+ let decl = self . parse_fn_decl ( ) ;
3085
3086
let ( inner_attrs, body) = self . parse_inner_attrs_and_block ( true ) ;
3086
3087
( ident,
3087
3088
item_fn ( decl, purity, abis, generics, body) ,
@@ -3593,7 +3594,7 @@ pub impl Parser {
3593
3594
let vis = self . parse_visibility ( ) ;
3594
3595
let purity = self . parse_fn_purity ( ) ;
3595
3596
let ( ident, generics) = self . parse_fn_header ( ) ;
3596
- let decl = self . parse_fn_decl ( |p| p . parse_arg ( ) ) ;
3597
+ let decl = self . parse_fn_decl ( ) ;
3597
3598
let hi = self . span . hi ;
3598
3599
self . expect ( & token:: SEMI ) ;
3599
3600
@ast:: foreign_item { ident : ident,
0 commit comments