mozilla/rust — pull request #7317 by Aatch (2013-06-23 04:22:03+00:00)
Title: Add #[no_drop_flag] attribute

This adds a `#[no_drop_flag]` attribute. This attribute tells the compiler to omit the drop flag from the struct, if it has a destructor. When the destructor is run, instead of setting the drop flag, it instead zeroes-out the struct. This means the destructor can run multiple times and therefore it is up to the developer to use it safely.

The primary usage case for this is smart-pointer types like `Rc` as the extra flag caused the struct to be 1 word larger because of alignment.

This closes #7271 and #7138