librustc: Replace all uses of fn() with &fn(). rs=defun

This commit is contained in:
Patrick Walton 2013-03-07 14:38:38 -08:00
parent 51cdca0bf0
commit d18f785457
198 changed files with 813 additions and 812 deletions

View file

@ -1829,7 +1829,7 @@ pub impl Parser {
fn parse_sugary_call_expr(&self, keyword: ~str,
sugar: CallSugar,
ctor: fn(+v: @expr) -> expr_) -> @expr {
ctor: &fn(+v: @expr) -> expr_) -> @expr {
let lo = self.last_span;
// Parse the callee `foo` in
// for foo || {
@ -2769,7 +2769,7 @@ pub impl Parser {
(lifetimes, opt_vec::take_vec(result))
}
fn parse_fn_decl(&self, parse_arg_fn: fn(&Parser) -> arg_or_capture_item)
fn parse_fn_decl(&self, parse_arg_fn: &fn(&Parser) -> arg_or_capture_item)
-> fn_decl
{
let args_or_capture_items: ~[arg_or_capture_item] =
@ -2816,7 +2816,7 @@ pub impl Parser {
fn(&Parser) -> arg_or_capture_item
) -> (self_ty, fn_decl) {
fn maybe_parse_self_ty(
cnstr: fn(+v: mutability) -> ast::self_ty_,
cnstr: &fn(+v: mutability) -> ast::self_ty_,
p: &Parser
) -> ast::self_ty_ {
// We need to make sure it isn't a mode or a type