parent
9c46cc58cb
commit
b277039325
5 changed files with 13 additions and 3 deletions
|
@ -197,6 +197,7 @@ fn enc_proto(w: io::writer, proto: proto) {
|
|||
proto_iter. { w.write_char('W'); }
|
||||
proto_fn. { w.write_char('F'); }
|
||||
proto_block. { w.write_char('B'); }
|
||||
proto_bare. { w.write_char('R'); }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -478,7 +478,7 @@ mod write {
|
|||
// has iter type and block has block type. This may end up changing.
|
||||
fn proto_to_ty_proto(proto: ast::proto) -> ast::proto {
|
||||
ret alt proto {
|
||||
ast::proto_iter. | ast::proto_block. { proto }
|
||||
ast::proto_iter. | ast::proto_block. | ast::proto_bare. { proto }
|
||||
_ { ast::proto_fn }
|
||||
};
|
||||
}
|
||||
|
|
|
@ -102,7 +102,15 @@ tag kind { kind_pinned; kind_shared; kind_unique; }
|
|||
|
||||
tag _auth { auth_unsafe; }
|
||||
|
||||
tag proto { proto_iter; proto_fn; proto_block; proto_closure; }
|
||||
tag proto {
|
||||
proto_iter;
|
||||
proto_fn;
|
||||
proto_block;
|
||||
proto_closure;
|
||||
// Functions without an environment. Eventually, this will
|
||||
// merge with proto_fn.
|
||||
proto_bare;
|
||||
}
|
||||
|
||||
tag binop {
|
||||
add;
|
||||
|
|
|
@ -2129,7 +2129,7 @@ fn parse_auth(p: parser) -> ast::_auth {
|
|||
fn parse_fn_proto(p: parser) -> ast::proto {
|
||||
if p.peek() == token::POUND {
|
||||
p.bump();
|
||||
ast::proto_fn
|
||||
ast::proto_bare
|
||||
} else {
|
||||
ast::proto_fn
|
||||
}
|
||||
|
|
|
@ -1643,6 +1643,7 @@ fn proto_to_str(p: ast::proto) -> str {
|
|||
ast::proto_iter. { "iter" }
|
||||
ast::proto_block. { "block" }
|
||||
ast::proto_closure. { "lambda" }
|
||||
ast::proto_bare. { "fn#" }
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue