about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-02-21 15:44:03 -0800
committerPatrick Walton <pcwalton@mimiga.net>2013-02-21 15:45:55 -0800
commit91479363ccc4ee26aadfb3d2bc3b4868ba426ebd (patch)
tree20958a78a62509080a5cfc37d6242ea19609b78f
parent9c71249b9d97581e273938986e1fd67fd7b7b20b (diff)
downloadrust-91479363ccc4ee26aadfb3d2bc3b4868ba426ebd.tar.gz
rust-91479363ccc4ee26aadfb3d2bc3b4868ba426ebd.zip
librustc: Remove all mutable fields from librustc. rs=demuting
-rw-r--r--src/librustc/middle/ty.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs
index 413ec9fcdf3..69c50d7d84a 100644
--- a/src/librustc/middle/ty.rs
+++ b/src/librustc/middle/ty.rs
@@ -230,7 +230,7 @@ pub type ctxt = @ctxt_;
 struct ctxt_ {
     diag: syntax::diagnostic::span_handler,
     interner: HashMap<intern_key, t_box>,
-    mut next_id: uint,
+    next_id: @mut uint,
     vecs_implicitly_copyable: bool,
     legacy_modes: bool,
     legacy_records: bool,
@@ -261,7 +261,7 @@ struct ctxt_ {
     short_names_cache: HashMap<t, @~str>,
     needs_drop_cache: HashMap<t, bool>,
     needs_unwind_cleanup_cache: HashMap<t, bool>,
-    mut tc_cache: LinearMap<uint, TypeContents>,
+    tc_cache: @mut LinearMap<uint, TypeContents>,
     ast_ty_to_ty_cache: HashMap<node_id, ast_ty_to_ty_cache_entry>,
     enum_var_cache: HashMap<def_id, @~[VariantInfo]>,
     trait_method_cache: HashMap<def_id, @~[method]>,
@@ -811,7 +811,7 @@ pub fn mk_ctxt(s: session::Session,
     @ctxt_ {
         diag: s.diagnostic(),
         interner: interner,
-        mut next_id: 0u,
+        next_id: @mut 0,
         vecs_implicitly_copyable: vecs_implicitly_copyable,
         legacy_modes: legacy_modes,
         legacy_records: legacy_records,
@@ -831,7 +831,7 @@ pub fn mk_ctxt(s: session::Session,
         short_names_cache: new_ty_hash(),
         needs_drop_cache: new_ty_hash(),
         needs_unwind_cleanup_cache: new_ty_hash(),
-        tc_cache: LinearMap::new(),
+        tc_cache: @mut LinearMap::new(),
         ast_ty_to_ty_cache: HashMap(),
         enum_var_cache: HashMap(),
         trait_method_cache: HashMap(),
@@ -920,7 +920,7 @@ fn mk_t_with_id(cx: ctxt, +st: sty, o_def_id: Option<ast::def_id>) -> t {
 
     let t = @t_box_ {
         sty: st,
-        id: cx.next_id,
+        id: *cx.next_id,
         flags: flags,
         o_def_id: o_def_id
     };
@@ -931,7 +931,7 @@ fn mk_t_with_id(cx: ctxt, +st: sty, o_def_id: Option<ast::def_id>) -> t {
 
     cx.interner.insert(key, t);
 
-    cx.next_id += 1u;
+    *cx.next_id += 1;
     unsafe { cast::reinterpret_cast(&t) }
 }