Skip to content

Commit 4af7ebc

Browse files
brsonthestinger
authored andcommitted
Rename #[non_sendable] to #[no_send]
1 parent e239346 commit 4af7ebc

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/libextra/rc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ struct RcBox<T> {
3636

3737
/// Immutable reference counted pointer type
3838
#[unsafe_no_drop_flag]
39-
#[non_sendable]
39+
#[no_send]
4040
pub struct Rc<T> {
4141
priv ptr: *mut RcBox<T>,
4242
}
@@ -168,7 +168,7 @@ struct RcMutBox<T> {
168168

169169
/// Mutable reference counted pointer type
170170
#[non_owned]
171-
#[non_sendable]
171+
#[no_send]
172172
#[mutable]
173173
#[unsafe_no_drop_flag]
174174
pub struct RcMut<T> {

src/librustc/middle/ty.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1969,7 +1969,7 @@ static TC_ONCE_CLOSURE: TypeContents = TypeContents{bits: 0b0001_0000_0000};
19691969
/// An enum with no variants.
19701970
static TC_EMPTY_ENUM: TypeContents = TypeContents{bits: 0b0010_0000_0000};
19711971

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

19751975
/// 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 {
22072207
if has_attr(cx, did, "mutable") {
22082208
tc = tc + TC_MUTABLE;
22092209
}
2210-
if has_attr(cx, did, "non_sendable") {
2210+
if has_attr(cx, did, "no_send") {
22112211
tc = tc + TC_NON_SENDABLE;
22122212
}
22132213
tc

src/test/compile-fail/non_owned-enum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[non_sendable]
11+
#[no_send]
1212
enum Foo { A }
1313

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

src/test/compile-fail/non_owned-struct.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[non_sendable]
11+
#[no_send]
1212
struct Foo { a: int }
1313

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

0 commit comments

Comments
 (0)