Rename ast::proto_fn to ast::proto_shared

This commit is contained in:
Brian Anderson 2011-10-18 20:22:46 -07:00
parent 29ad3bdb10
commit 4b30a06abe
13 changed files with 32 additions and 31 deletions

View file

@ -105,11 +105,10 @@ tag _auth { auth_unsafe; }
tag proto {
proto_iter;
proto_fn;
proto_shared;
proto_block;
// FIXME: Merge with proto_shared
proto_closure;
// Functions without an environment. Eventually, this will
// merge with proto_fn.
proto_bare;
}

View file

@ -1901,7 +1901,7 @@ fn parse_item_res(p: parser, attrs: [ast::attribute]) -> @ast::item {
il: ast::il_normal,
cf: ast::return_val,
constraints: []};
let f = {decl: decl, proto: ast::proto_fn, body: dtor};
let f = {decl: decl, proto: ast::proto_shared, body: dtor};
ret mk_item(p, lo, dtor.span.hi, ident,
ast::item_res(f, p.get_id(), ty_params, p.get_id()), attrs);
}
@ -2140,7 +2140,7 @@ fn parse_fn_item_proto(p: parser) -> ast::proto {
ast::proto_bare
} else if p.peek() == token::AT {
p.bump();
ast::proto_fn
ast::proto_shared
} else {
ast::proto_bare
}
@ -2152,7 +2152,7 @@ fn parse_fn_ty_proto(p: parser) -> ast::proto {
ast::proto_bare
} else if p.peek() == token::AT {
p.bump();
ast::proto_fn
ast::proto_shared
} else {
ast::proto_bare
}
@ -2164,7 +2164,7 @@ fn parse_fn_anon_proto(p: parser) -> ast::proto {
ast::proto_bare
} else if p.peek() == token::AT {
p.bump();
ast::proto_fn
ast::proto_shared
} else {
ast::proto_bare
}

View file

@ -1643,7 +1643,7 @@ fn ast_fn_constrs_str(decl: ast::fn_decl, constrs: [@ast::constr]) -> str {
fn proto_to_str(p: ast::proto) -> str {
ret alt p {
ast::proto_fn. { "fn@" }
ast::proto_shared. { "fn@" }
ast::proto_iter. { "iter" }
ast::proto_block. { "block" }
ast::proto_closure. { "lambda" }