What's the story of #[unsafe_no_drop_flag]
as per Rust 1.1? Is there still drop flag overhead in Rust structures?
I have a struct wrapping a value from C API to define some safe methods:
// This really comes from another crate
mod ffi {
#[repr(C)]
pub struct RawValue {
// ...
}
}
#[repr(C)]
#[unsafe_no_drop_flag]
struct Value(ffi::RawValue);
The implementation of Drop
for Value
uses the contents of the C structure to determine when the value has been destroyed, so the extraneous flag is not needed. If I remove the unsafe_no_drop_flag
attribute, does this make an array of Value
different in layout from an array of RawValue
?