Rename #[no_drop_flag] to #[unsafe_no_drop_flag]

This commit is contained in:
Birunthan Mohanathas 2013-06-27 20:47:45 +03:00 committed by Daniel Micay
parent 779ee2a2dd
commit dcf1dc060a
4 changed files with 5 additions and 5 deletions

View File

@ -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)
}

View File

@ -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
}

View File

@ -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 {
@ -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;

View File

@ -10,7 +10,7 @@
use std::sys::size_of;
#[no_drop_flag]
#[unsafe_no_drop_flag]
struct Test<T> {
a: T
}