Skip to content

Commit 22b7eb3

Browse files
brsonthestinger
authored andcommitted
Rename #[mutable] to #[no_freeze]
1 parent 4af7ebc commit 22b7eb3

File tree

7 files changed

+11
-7
lines changed

7 files changed

+11
-7
lines changed

src/libextra/arc.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,8 @@ struct RWARCInner<T> { lock: RWlock, failed: bool, data: T }
276276
*
277277
* Unlike mutex_arcs, rw_arcs are safe, because they cannot be nested.
278278
*/
279-
#[mutable]
279+
#[mutable] // XXX remove after snap
280+
#[no_freeze]
280281
struct RWARC<T> {
281282
x: UnsafeAtomicRcBox<RWARCInner<T>>,
282283
}

src/libextra/arena.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ struct Chunk {
6565
is_pod: bool,
6666
}
6767

68-
#[mutable]
68+
#[mutable] // XXX remove after snap
69+
#[no_freeze]
6970
pub struct Arena {
7071
// The head is separated out from the list as a unbenchmarked
7172
// microoptimization, to avoid needing to case on the list to

src/libextra/rc.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ struct RcMutBox<T> {
169169
/// Mutable reference counted pointer type
170170
#[non_owned]
171171
#[no_send]
172-
#[mutable]
172+
#[mutable] // XXX remove after snap
173+
#[no_freeze]
173174
#[unsafe_no_drop_flag]
174175
pub struct RcMut<T> {
175176
priv ptr: *mut RcMutBox<T>,

src/librustc/middle/ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2204,7 +2204,7 @@ pub fn type_contents(cx: ctxt, ty: t) -> TypeContents {
22042204
}
22052205

22062206
fn apply_tc_attr(cx: ctxt, did: def_id, mut tc: TypeContents) -> TypeContents {
2207-
if has_attr(cx, did, "mutable") {
2207+
if has_attr(cx, did, "no_freeze") {
22082208
tc = tc + TC_MUTABLE;
22092209
}
22102210
if has_attr(cx, did, "no_send") {

src/libstd/cell.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ A dynamic, mutable location.
2222
Similar to a mutable option type, but friendlier.
2323
*/
2424

25-
#[mutable]
25+
#[mutable] // XXX remove after snap
26+
#[no_freeze]
2627
#[deriving(Clone, DeepClone, Eq)]
2728
#[allow(missing_doc)]
2829
pub struct Cell<T> {

src/test/compile-fail/mutable-enum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[mutable]
11+
#[no_freeze]
1212
enum Foo { A }
1313

1414
fn bar<T: Freeze>(_: T) {}

src/test/compile-fail/mutable-struct.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[mutable]
11+
#[no_freeze]
1212
struct Foo { a: int }
1313

1414
fn bar<T: Freeze>(_: T) {}

0 commit comments

Comments
 (0)