Rename #[non_sendable] to #[no_send]
This commit is contained in:
parent
e23934645a
commit
4af7ebcd8f
@ -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 @@ 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
|
||||
|
@ -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) {}
|
||||
|
Loading…
Reference in New Issue
Block a user