提交 4af7ebcd 编写于 作者: B Brian Anderson 提交者: Daniel Micay

Rename #[non_sendable] to #[no_send]

上级 e2393464
......@@ -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>,
}
......@@ -168,7 +168,7 @@ struct RcMutBox<T> {
/// Mutable reference counted pointer type
#[non_owned]
#[non_sendable]
#[no_send]
#[mutable]
#[unsafe_no_drop_flag]
pub struct RcMut<T> {
......
......@@ -1969,7 +1969,7 @@ fn to_str(&self) -> ~str {
/// 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 @@ fn apply_tc_attr(cx: ctxt, did: def_id, mut tc: TypeContents) -> 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
......
......@@ -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) {}
......
......@@ -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) {}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册