Skip to content

Commit dcf1dc0

Browse files
poiruthestinger
authored andcommitted
Rename #[no_drop_flag] to #[unsafe_no_drop_flag]
1 parent 779ee2a commit dcf1dc0

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/librustc/middle/ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3904,7 +3904,7 @@ impl DtorKind {
39043904
pub fn ty_dtor(cx: ctxt, struct_id: def_id) -> DtorKind {
39053905
match cx.destructor_for_type.find(&struct_id) {
39063906
Some(&method_def_id) => {
3907-
let flag = !has_attr(cx, struct_id, "no_drop_flag");
3907+
let flag = !has_attr(cx, struct_id, "unsafe_no_drop_flag");
39083908

39093909
TraitDtor(method_def_id, flag)
39103910
}

src/libstd/unstable/atomics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ pub struct AtomicPtr<T> {
6262
/**
6363
* An owned atomic pointer. Ensures that only a single reference to the data is held at any time.
6464
*/
65-
#[no_drop_flag]
65+
#[unsafe_no_drop_flag]
6666
pub struct AtomicOption<T> {
6767
priv p: *mut c_void
6868
}

src/libstd/util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub fn replace<T>(dest: &mut T, mut src: T) -> T {
7676

7777
/// A non-copyable dummy type.
7878
#[deriving(Eq, TotalEq, Ord, TotalOrd)]
79-
#[no_drop_flag]
79+
#[unsafe_no_drop_flag]
8080
pub struct NonCopyable;
8181

8282
impl Drop for NonCopyable {
@@ -171,7 +171,7 @@ mod tests {
171171
fn test_noncopyable() {
172172
assert_eq!(size_of::<NonCopyable>(), 0);
173173

174-
// verify that `#[no_drop_flag]` works as intended on a zero-size struct
174+
// verify that `#[unsafe_no_drop_flag]` works as intended on a zero-size struct
175175

176176
static mut did_run: bool = false;
177177

src/test/run-pass/attr-no-drop-flag-size.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use std::sys::size_of;
1212

13-
#[no_drop_flag]
13+
#[unsafe_no_drop_flag]
1414
struct Test<T> {
1515
a: T
1616
}

0 commit comments

Comments
 (0)