aboutsummaryrefslogtreecommitdiff
path: root/src/comp/middle
diff options
context:
space:
mode:
authorMarijn Haverbeke <[email protected]>2011-05-05 20:17:44 +0200
committerMarijn Haverbeke <[email protected]>2011-05-05 20:19:43 +0200
commit1f45dda9d2944a90e1dfa9599d030cbfb4f927b7 (patch)
tree1a1d7c3e15af362539d6788af29ab27d751c6416 /src/comp/middle
parentReturn a fresh, unreachable context after ret, break, and cont (diff)
downloadrust-1f45dda9d2944a90e1dfa9599d030cbfb4f927b7.tar.xz
rust-1f45dda9d2944a90e1dfa9599d030cbfb4f927b7.zip
Remove 'deprecated mutable...' from our code
This should make compilation a bit less noisy.
Diffstat (limited to 'src/comp/middle')
-rw-r--r--src/comp/middle/ty.rs12
-rw-r--r--src/comp/middle/typeck.rs12
2 files changed, 12 insertions, 12 deletions
diff --git a/src/comp/middle/ty.rs b/src/comp/middle/ty.rs
index c5e5ffa3..9e6b4489 100644
--- a/src/comp/middle/ty.rs
+++ b/src/comp/middle/ty.rs
@@ -2281,7 +2281,7 @@ mod Unify {
case (_) {
// Just bind the type variable to the expected type.
- auto vlen = _vec.len[mutable vec[t]](cx.types);
+ auto vlen = _vec.len[vec[t]](cx.types);
if (actual_n < vlen) {
cx.types.(actual_n) += vec(expected);
} else {
@@ -2649,7 +2649,7 @@ mod Unify {
case (ty.ty_var(?expected_id)) {
// Add a binding.
auto expected_n = get_or_create_set(cx, expected_id);
- auto vlen = _vec.len[mutable vec[t]](cx.types);
+ auto vlen = _vec.len[vec[t]](cx.types);
if (expected_n < vlen) {
cx.types.(expected_n) += vec(actual);
} else {
@@ -2713,7 +2713,7 @@ mod Unify {
fn unify_sets(@ctxt cx) -> vec[t] {
let vec[t] throwaway = vec();
let vec[mutable vec[t]] set_types = vec(mutable throwaway);
- _vec.pop[mutable vec[t]](set_types); // FIXME: botch
+ _vec.pop[vec[t]](set_types); // FIXME: botch
for (UFind.node node in cx.sets.nodes) {
let vec[t] v = vec();
@@ -2721,7 +2721,7 @@ mod Unify {
}
auto i = 0u;
- while (i < _vec.len[mutable vec[t]](set_types)) {
+ while (i < _vec.len[vec[t]](set_types)) {
auto root = UFind.find(cx.sets, i);
set_types.(root) += cx.types.(i);
i += 1u;
@@ -2746,7 +2746,7 @@ mod Unify {
ty_ctxt tcx) -> result {
let vec[t] throwaway = vec();
let vec[mutable vec[t]] types = vec(mutable throwaway);
- _vec.pop[mutable vec[t]](types); // FIXME: botch
+ _vec.pop[vec[t]](types); // FIXME: botch
auto cx = @rec(sets=UFind.make(),
var_ids=common.new_int_hash[uint](),
@@ -2759,7 +2759,7 @@ mod Unify {
case (ures_ok(?typ)) {
// Fast path: if there are no local variables, don't perform
// substitutions.
- if (_vec.len[mutable UFind.node](cx.sets.nodes) == 0u) {
+ if (_vec.len(cx.sets.nodes) == 0u) {
ret ures_ok(typ);
}
diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs
index 094b7e1f..ec50fd84 100644
--- a/src/comp/middle/typeck.rs
+++ b/src/comp/middle/typeck.rs
@@ -843,7 +843,7 @@ mod Unify {
// FIXME: horrid botch
let vec[mutable ty.t] param_substs =
vec(mutable ty.mk_nil(fcx.ccx.tcx));
- _vec.pop[mutable ty.t](param_substs);
+ _vec.pop(param_substs);
ret with_params(fcx, expected, actual, param_substs);
}
@@ -1000,7 +1000,7 @@ mod Demand {
let vec[mutable ty.t] ty_param_substs =
vec(mutable ty.mk_nil(fcx.ccx.tcx));
- _vec.pop[mutable ty.t](ty_param_substs); // FIXME: horrid botch
+ _vec.pop(ty_param_substs); // FIXME: horrid botch
for (ty.t ty_param_subst in ty_param_substs_0) {
ty_param_substs += vec(mutable ty_param_subst);
}
@@ -1009,7 +1009,7 @@ mod Demand {
case (ures_ok(?t)) {
// TODO: Use "freeze", when we have it.
let vec[ty.t] result_ty_param_substs = vec();
- for (mutable ty.t ty_param_subst in ty_param_substs) {
+ for (ty.t ty_param_subst in ty_param_substs) {
result_ty_param_substs += vec(ty_param_subst);
}
@@ -2782,7 +2782,7 @@ fn hash_unify_cache_entry(&unify_cache_entry uce) -> uint {
h += h << 5u + ty.hash_ty(uce._1);
auto i = 0u;
- auto tys_len = _vec.len[mutable ty.t](uce._2);
+ auto tys_len = _vec.len(uce._2);
while (i < tys_len) {
h += h << 5u + ty.hash_ty(uce._2.(i));
i += 1u;
@@ -2795,8 +2795,8 @@ fn eq_unify_cache_entry(&unify_cache_entry a, &unify_cache_entry b) -> bool {
if (!ty.eq_ty(a._0, b._0) || !ty.eq_ty(a._1, b._1)) { ret false; }
auto i = 0u;
- auto tys_len = _vec.len[mutable ty.t](a._2);
- if (_vec.len[mutable ty.t](b._2) != tys_len) { ret false; }
+ auto tys_len = _vec.len(a._2);
+ if (_vec.len(b._2) != tys_len) { ret false; }
while (i < tys_len) {
if (!ty.eq_ty(a._2.(i), b._2.(i))) { ret false; }