Mark some more types as having insignificant dtor
This commit is contained in:
parent
a3f76a26e0
commit
7033468a67
2 changed files with 2 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue