about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2013-06-28 14:36:33 -0700
committerDaniel Micay <danielmicay@gmail.com>2013-06-29 00:56:36 -0400
commit22b7eb38024afc38dbcfaa18796371b7d6b5b1d0 (patch)
tree9e7ea87772d5c812addbdb854ccc703ded0bc733
parent4af7ebcd8f72356880abccc411a1632e8f07e1c1 (diff)
downloadrust-22b7eb38024afc38dbcfaa18796371b7d6b5b1d0.tar.gz
rust-22b7eb38024afc38dbcfaa18796371b7d6b5b1d0.zip
Rename #[mutable] to #[no_freeze]
-rw-r--r--src/libextra/arc.rs3
-rw-r--r--src/libextra/arena.rs3
-rw-r--r--src/libextra/rc.rs3
-rw-r--r--src/librustc/middle/ty.rs2
-rw-r--r--src/libstd/cell.rs3
-rw-r--r--src/test/compile-fail/mutable-enum.rs2
-rw-r--r--src/test/compile-fail/mutable-struct.rs2
7 files changed, 11 insertions, 7 deletions
diff --git a/src/libextra/arc.rs b/src/libextra/arc.rs
index 2fb03fecb59..30067c92300 100644
--- a/src/libextra/arc.rs
+++ b/src/libextra/arc.rs
@@ -276,7 +276,8 @@ struct RWARCInner<T> { lock: RWlock, failed: bool, data: T }
  *
  * Unlike mutex_arcs, rw_arcs are safe, because they cannot be nested.
  */
-#[mutable]
+#[mutable] // XXX remove after snap
+#[no_freeze]
 struct RWARC<T> {
     x: UnsafeAtomicRcBox<RWARCInner<T>>,
 }
diff --git a/src/libextra/arena.rs b/src/libextra/arena.rs
index 2f18b0562e0..2c6e7a30448 100644
--- a/src/libextra/arena.rs
+++ b/src/libextra/arena.rs
@@ -65,7 +65,8 @@ struct Chunk {
     is_pod: bool,
 }
 
-#[mutable]
+#[mutable] // XXX remove after snap
+#[no_freeze]
 pub struct Arena {
     // The head is separated out from the list as a unbenchmarked
     // microoptimization, to avoid needing to case on the list to
diff --git a/src/libextra/rc.rs b/src/libextra/rc.rs
index 31fed541bb1..613c0b1ae41 100644
--- a/src/libextra/rc.rs
+++ b/src/libextra/rc.rs
@@ -169,7 +169,8 @@ struct RcMutBox<T> {
 /// Mutable reference counted pointer type
 #[non_owned]
 #[no_send]
-#[mutable]
+#[mutable] // XXX remove after snap
+#[no_freeze]
 #[unsafe_no_drop_flag]
 pub struct RcMut<T> {
     priv ptr: *mut RcMutBox<T>,
diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs
index 03a73c847ee..f1172fb1da6 100644
--- a/src/librustc/middle/ty.rs
+++ b/src/librustc/middle/ty.rs
@@ -2204,7 +2204,7 @@ pub fn type_contents(cx: ctxt, ty: t) -> TypeContents {
     }
 
     fn apply_tc_attr(cx: ctxt, did: def_id, mut tc: TypeContents) -> TypeContents {
-        if has_attr(cx, did, "mutable") {
+        if has_attr(cx, did, "no_freeze") {
             tc = tc + TC_MUTABLE;
         }
         if has_attr(cx, did, "no_send") {
diff --git a/src/libstd/cell.rs b/src/libstd/cell.rs
index e1d2b246dd3..53ea11f2b05 100644
--- a/src/libstd/cell.rs
+++ b/src/libstd/cell.rs
@@ -22,7 +22,8 @@ A dynamic, mutable location.
 Similar to a mutable option type, but friendlier.
 */
 
-#[mutable]
+#[mutable] // XXX remove after snap
+#[no_freeze]
 #[deriving(Clone, DeepClone, Eq)]
 #[allow(missing_doc)]
 pub struct Cell<T> {
diff --git a/src/test/compile-fail/mutable-enum.rs b/src/test/compile-fail/mutable-enum.rs
index db2172b2e57..35842a53a31 100644
--- a/src/test/compile-fail/mutable-enum.rs
+++ b/src/test/compile-fail/mutable-enum.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[mutable]
+#[no_freeze]
 enum Foo { A }
 
 fn bar<T: Freeze>(_: T) {}
diff --git a/src/test/compile-fail/mutable-struct.rs b/src/test/compile-fail/mutable-struct.rs
index 8511bcdcd35..6f29fcfd96d 100644
--- a/src/test/compile-fail/mutable-struct.rs
+++ b/src/test/compile-fail/mutable-struct.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[mutable]
+#[no_freeze]
 struct Foo { a: int }
 
 fn bar<T: Freeze>(_: T) {}