diff options
| author | Marijn Haverbeke <marijnh@gmail.com> | 2011-09-01 10:03:17 +0200 |
|---|---|---|
| committer | Marijn Haverbeke <marijnh@gmail.com> | 2011-09-01 16:32:38 +0200 |
| commit | 34ae491ca9f7ad7549fa0d767f7452055df875d8 (patch) | |
| tree | 911eb4929b9b47f4ade295193cfddc8bb9b09870 /src/comp/middle/tstate | |
| parent | 9ba3fe5e40ed404f8865c0be4f9b5827d5861439 (diff) | |
| download | rust-34ae491ca9f7ad7549fa0d767f7452055df875d8.tar.gz rust-34ae491ca9f7ad7549fa0d767f7452055df875d8.zip | |
Store arg mode and objfield mutability in their def
Diffstat (limited to 'src/comp/middle/tstate')
| -rw-r--r-- | src/comp/middle/tstate/auxiliary.rs | 8 | ||||
| -rw-r--r-- | src/comp/middle/tstate/pre_post_conditions.rs | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/comp/middle/tstate/auxiliary.rs b/src/comp/middle/tstate/auxiliary.rs index f4cc34bc7a9..be5d149135d 100644 --- a/src/comp/middle/tstate/auxiliary.rs +++ b/src/comp/middle/tstate/auxiliary.rs @@ -625,7 +625,7 @@ fn expr_to_constr_arg(tcx: ty::ctxt, e: &@expr) -> @constr_arg_use { carg_ident({ident: p.node.idents[0], node: l_id.node})); } - some(def_arg(a_id)) { + some(def_arg(a_id, _)) { ret @respan(p.span, carg_ident({ident: p.node.idents[0], node: a_id.node})); @@ -849,7 +849,7 @@ fn local_node_id_to_def_id_strict(fcx: &fn_ctxt, sp: &span, i: &node_id) -> def_id { alt local_node_id_to_def(fcx, i) { some(def_local(d_id)) { ret d_id; } - some(def_arg(a_id)) { ret a_id; } + some(def_arg(a_id, _)) { ret a_id; } some(_) { fcx.ccx.tcx.sess.span_fatal(sp, ~"local_node_id_to_def_id: id \ @@ -871,7 +871,7 @@ fn local_node_id_to_def(fcx: &fn_ctxt, i: &node_id) -> option::t<def> { fn local_node_id_to_def_id(fcx: &fn_ctxt, i: &node_id) -> option::t<def_id> { alt local_node_id_to_def(fcx, i) { some(def_local(d_id)) { some(d_id) } - some(def_arg(a_id)) { some(a_id) } + some(def_arg(a_id, _)) { some(a_id) } _ { none } } } @@ -880,7 +880,7 @@ fn local_node_id_to_local_def_id(fcx: &fn_ctxt, i: &node_id) -> option::t<node_id> { alt local_node_id_to_def(fcx, i) { some(def_local(d_id)) { some(d_id.node) } - some(def_arg(a_id)) { some(a_id.node) } + some(def_arg(a_id, _)) { some(a_id.node) } _ { none } } } diff --git a/src/comp/middle/tstate/pre_post_conditions.rs b/src/comp/middle/tstate/pre_post_conditions.rs index f5014cbb313..ce53a204df9 100644 --- a/src/comp/middle/tstate/pre_post_conditions.rs +++ b/src/comp/middle/tstate/pre_post_conditions.rs @@ -295,7 +295,7 @@ fn handle_update(fcx: &fn_ctxt, parent: &@expr, lhs: &@expr, rhs: &@expr, fn handle_var(fcx: &fn_ctxt, rslt: &pre_and_post, id: node_id, name: ident) { let df = node_id_to_def_upvar_strict(fcx, id); alt df { - def_local(d_id) | def_arg(d_id) { + def_local(d_id) | def_arg(d_id, _) { let i = bit_num(fcx, ninit(d_id.node, name)); use_var(fcx, d_id.node); require_and_preserve(i, rslt); |
