Rename ast::controlflow to ast::ret_style
It will include information about returning by alias.
This commit is contained in:
parent
f6fe07d1f3
commit
6eb9738a66
13 changed files with 58 additions and 61 deletions
|
|
@ -371,7 +371,7 @@ fn parse_hex(st: @pstate) -> uint {
|
|||
}
|
||||
|
||||
fn parse_ty_fn(st: @pstate, sd: str_def) ->
|
||||
{args: [ty::arg], ty: ty::t, cf: ast::controlflow, cs: [@ty::constr]} {
|
||||
{args: [ty::arg], ty: ty::t, cf: ast::ret_style, cs: [@ty::constr]} {
|
||||
assert (next(st) as char == '[');
|
||||
let inputs: [ty::arg] = [];
|
||||
while peek(st) as char != ']' {
|
||||
|
|
@ -391,7 +391,7 @@ fn parse_ty_fn(st: @pstate, sd: str_def) ->
|
|||
a_bang. {
|
||||
ret {args: inputs, ty: ty::mk_bot(st.tcx), cf: ast::noreturn, cs: cs};
|
||||
}
|
||||
a_ty(t) { ret {args: inputs, ty: t, cf: ast::return, cs: cs}; }
|
||||
a_ty(t) { ret {args: inputs, ty: t, cf: ast::return_val, cs: cs}; }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ fn enc_sty(w: io::writer, cx: @ctxt, st: ty::sty) {
|
|||
native_abi_llvm. { w.write_char('l'); }
|
||||
native_abi_x86stdcall. { w.write_char('s'); }
|
||||
}
|
||||
enc_ty_fn(w, cx, args, out, return, []);
|
||||
enc_ty_fn(w, cx, args, out, return_val, []);
|
||||
}
|
||||
ty::ty_obj(methods) {
|
||||
w.write_str("O[");
|
||||
|
|
@ -199,7 +199,7 @@ fn enc_proto(w: io::writer, proto: proto) {
|
|||
}
|
||||
|
||||
fn enc_ty_fn(w: io::writer, cx: @ctxt, args: [ty::arg], out: ty::t,
|
||||
cf: controlflow, constrs: [@ty::constr]) {
|
||||
cf: ret_style, constrs: [@ty::constr]) {
|
||||
w.write_char('[');
|
||||
for arg: ty::arg in args {
|
||||
alt arg.mode {
|
||||
|
|
@ -219,7 +219,6 @@ fn enc_ty_fn(w: io::writer, cx: @ctxt, args: [ty::arg], out: ty::t,
|
|||
enc_constr(w, cx, c);
|
||||
}
|
||||
alt cf { noreturn. { w.write_char('!'); } _ { enc_ty(w, cx, out); } }
|
||||
|
||||
}
|
||||
|
||||
// FIXME less copy-and-paste
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue