Use a non-ambiguous character for encoding bare functions

I was using 'R' and that was already used for records.

Issue #1022
This commit is contained in:
Brian Anderson 2011-10-11 14:38:15 -07:00
parent 8c77d063a9
commit cfa2346086
2 changed files with 6 additions and 1 deletions

View File

@ -245,6 +245,11 @@ fn parse_ty(st: @pstate, sd: str_def) -> ty::t {
ret ty::mk_fn(st.tcx, ast::proto_fn, func.args, func.ty, func.cf,
func.cs);
}
'f' {
let func = parse_ty_fn(st, sd);
ret ty::mk_fn(st.tcx, ast::proto_fn, func.args, func.ty, func.cf,
func.cs);
}
'W' {
let func = parse_ty_fn(st, sd);
ret ty::mk_fn(st.tcx, ast::proto_iter, func.args, func.ty, func.cf,

View File

@ -197,7 +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'); }
proto_bare. { w.write_char('f'); }
}
}