Skip to content

Commit

Permalink
Rename #[no_drop_flag] to #[unsafe_no_drop_flag]
Browse files Browse the repository at this point in the history
  • Loading branch information
poiru authored and thestinger committed Jun 28, 2013
1 parent 779ee2a commit dcf1dc0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/librustc/middle/ty.rs
Expand Up @@ -3904,7 +3904,7 @@ impl DtorKind {
pub fn ty_dtor(cx: ctxt, struct_id: def_id) -> DtorKind {
match cx.destructor_for_type.find(&struct_id) {
Some(&method_def_id) => {
let flag = !has_attr(cx, struct_id, "no_drop_flag");
let flag = !has_attr(cx, struct_id, "unsafe_no_drop_flag");

TraitDtor(method_def_id, flag)
}
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/unstable/atomics.rs
Expand Up @@ -62,7 +62,7 @@ pub struct AtomicPtr<T> {
/**
* An owned atomic pointer. Ensures that only a single reference to the data is held at any time.
*/
#[no_drop_flag]
#[unsafe_no_drop_flag]
pub struct AtomicOption<T> {
priv p: *mut c_void
}
Expand Down
4 changes: 2 additions & 2 deletions src/libstd/util.rs
Expand Up @@ -76,7 +76,7 @@ pub fn replace<T>(dest: &mut T, mut src: T) -> T {

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

impl Drop for NonCopyable {
Expand Down Expand Up @@ -171,7 +171,7 @@ mod tests {
fn test_noncopyable() {
assert_eq!(size_of::<NonCopyable>(), 0);

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

static mut did_run: bool = false;

Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/attr-no-drop-flag-size.rs
Expand Up @@ -10,7 +10,7 @@

use std::sys::size_of;

#[no_drop_flag]
#[unsafe_no_drop_flag]
struct Test<T> {
a: T
}
Expand Down

0 comments on commit dcf1dc0

Please sign in to comment.