Remove 'deprecated mutable...' from our code
This should make compilation a bit less noisy.
This commit is contained in:
parent
3d738e9e06
commit
1f45dda9d2
15 changed files with 43 additions and 43 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue