Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/libextra/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>>,
}
Expand Down
3 changes: 2 additions & 1 deletion src/libextra/arena.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions src/libextra/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct RcBox<T> {

/// Immutable reference counted pointer type
#[unsafe_no_drop_flag]
#[non_sendable]
#[no_send]
pub struct Rc<T> {
priv ptr: *mut RcBox<T>,
}
Expand Down Expand Up @@ -168,8 +168,9 @@ struct RcMutBox<T> {

/// Mutable reference counted pointer type
#[non_owned]
#[non_sendable]
#[mutable]
#[no_send]
#[mutable] // XXX remove after snap
#[no_freeze]
#[unsafe_no_drop_flag]
pub struct RcMut<T> {
priv ptr: *mut RcMutBox<T>,
Expand Down
6 changes: 3 additions & 3 deletions src/librustc/middle/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1969,7 +1969,7 @@ static TC_ONCE_CLOSURE: TypeContents = TypeContents{bits: 0b0001_0000_0000};
/// An enum with no variants.
static TC_EMPTY_ENUM: TypeContents = TypeContents{bits: 0b0010_0000_0000};

/// Contains a type marked with `#[non_sendable]`
/// Contains a type marked with `#[no_send]`
static TC_NON_SENDABLE: TypeContents = TypeContents{bits: 0b0100_0000_0000};

/// Is a bare vector, str, function, trait, etc (only relevant at top level).
Expand Down Expand Up @@ -2204,10 +2204,10 @@ 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, "non_sendable") {
if has_attr(cx, did, "no_send") {
tc = tc + TC_NON_SENDABLE;
}
tc
Expand Down
3 changes: 2 additions & 1 deletion src/libstd/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/mutable-enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/mutable-struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/non_owned-enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#[non_sendable]
#[no_send]
enum Foo { A }

fn bar<T: Send>(_: T) {}
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/non_owned-struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#[non_sendable]
#[no_send]
struct Foo { a: int }

fn bar<T: Send>(_: T) {}
Expand Down