Rename #[mutable] to #[no_freeze]

This commit is contained in:
Brian Anderson 2013-06-28 14:36:33 -07:00 committed by Daniel Micay
parent 4af7ebcd8f
commit 22b7eb3802
7 changed files with 11 additions and 7 deletions

View File

@ -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>>,
}

View File

@ -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

View File

@ -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>,

View File

@ -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") {

View File

@ -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> {

View File

@ -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) {}

View File

@ -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) {}