diff options
| author | Marijn Haverbeke <marijnh@gmail.com> | 2011-09-14 10:38:23 +0200 |
|---|---|---|
| committer | Marijn Haverbeke <marijnh@gmail.com> | 2011-09-14 10:38:23 +0200 |
| commit | 6eb9738a661f577eeb972032b5570013e6bcafdd (patch) | |
| tree | 526faf2c5e590605d2d796371c75a9e98c35f1ef /src/comp/metadata | |
| parent | f6fe07d1f3f8e98120169dea59ebc4d2eee4255c (diff) | |
| download | rust-6eb9738a661f577eeb972032b5570013e6bcafdd.tar.gz rust-6eb9738a661f577eeb972032b5570013e6bcafdd.zip | |
Rename ast::controlflow to ast::ret_style
It will include information about returning by alias.
Diffstat (limited to 'src/comp/metadata')
| -rw-r--r-- | src/comp/metadata/tydecode.rs | 4 | ||||
| -rw-r--r-- | src/comp/metadata/tyencode.rs | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/comp/metadata/tydecode.rs b/src/comp/metadata/tydecode.rs index 883fd0328f2..cc342fe4647 100644 --- a/src/comp/metadata/tydecode.rs +++ b/src/comp/metadata/tydecode.rs @@ -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}; } } } diff --git a/src/comp/metadata/tyencode.rs b/src/comp/metadata/tyencode.rs index 32bcefa0442..07df8fed24a 100644 --- a/src/comp/metadata/tyencode.rs +++ b/src/comp/metadata/tyencode.rs @@ -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 |
