diff --git a/src/libextra/rc.rs b/src/libextra/rc.rs index 009d68ac026..31fed541bb1 100644 --- a/src/libextra/rc.rs +++ b/src/libextra/rc.rs @@ -36,7 +36,7 @@ struct RcBox { /// Immutable reference counted pointer type #[unsafe_no_drop_flag] -#[non_sendable] +#[no_send] pub struct Rc { priv ptr: *mut RcBox, } @@ -168,7 +168,7 @@ struct RcMutBox { /// Mutable reference counted pointer type #[non_owned] -#[non_sendable] +#[no_send] #[mutable] #[unsafe_no_drop_flag] pub struct RcMut { diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs index 175529be206..03a73c847ee 100644 --- a/src/librustc/middle/ty.rs +++ b/src/librustc/middle/ty.rs @@ -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). @@ -2207,7 +2207,7 @@ pub fn type_contents(cx: ctxt, ty: t) -> TypeContents { if has_attr(cx, did, "mutable") { tc = tc + TC_MUTABLE; } - if has_attr(cx, did, "non_sendable") { + if has_attr(cx, did, "no_send") { tc = tc + TC_NON_SENDABLE; } tc diff --git a/src/test/compile-fail/non_owned-enum.rs b/src/test/compile-fail/non_owned-enum.rs index 20b571ad614..b436bfb8b0f 100644 --- a/src/test/compile-fail/non_owned-enum.rs +++ b/src/test/compile-fail/non_owned-enum.rs @@ -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) {} diff --git a/src/test/compile-fail/non_owned-struct.rs b/src/test/compile-fail/non_owned-struct.rs index d4b8e6755a1..542c3aa212b 100644 --- a/src/test/compile-fail/non_owned-struct.rs +++ b/src/test/compile-fail/non_owned-struct.rs @@ -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) {}