mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-17 01:13:11 +00:00
Mark some more types as having insignificant dtor
This commit is contained in:
parent
a3f76a26e0
commit
7033468a67
@ -696,6 +696,7 @@ impl CString {
|
||||
// memory-unsafe code from working by accident. Inline
|
||||
// to prevent LLVM from optimizing it away in debug builds.
|
||||
#[stable(feature = "cstring_drop", since = "1.13.0")]
|
||||
#[rustc_insignificant_dtor]
|
||||
impl Drop for CString {
|
||||
#[inline]
|
||||
fn drop(&mut self) {
|
||||
|
@ -124,6 +124,7 @@ const TAG_SIMPLE: usize = 0b11;
|
||||
/// is_unwind_safe::<std::io::Error>();
|
||||
/// ```
|
||||
#[repr(transparent)]
|
||||
#[rustc_insignificant_dtor]
|
||||
pub(super) struct Repr(NonNull<()>, PhantomData<ErrorData<Box<Custom>>>);
|
||||
|
||||
// All the types `Repr` stores internally are Send + Sync, and so is it.
|
||||
|
Loading…
Reference in New Issue
Block a user