Skip to content

Commit 118d2e4

Browse files
Mark some more types as having insignificant dtor
1 parent edc72ca commit 118d2e4

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

alloc/src/ffi/c_str.rs

+1
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,7 @@ impl CString {
696696
// memory-unsafe code from working by accident. Inline
697697
// to prevent LLVM from optimizing it away in debug builds.
698698
#[stable(feature = "cstring_drop", since = "1.13.0")]
699+
#[rustc_insignificant_dtor]
699700
impl Drop for CString {
700701
#[inline]
701702
fn drop(&mut self) {

std/src/io/error/repr_bitpacked.rs

+1
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ const TAG_SIMPLE: usize = 0b11;
124124
/// is_unwind_safe::<std::io::Error>();
125125
/// ```
126126
#[repr(transparent)]
127+
#[rustc_insignificant_dtor]
127128
pub(super) struct Repr(NonNull<()>, PhantomData<ErrorData<Box<Custom>>>);
128129

129130
// All the types `Repr` stores internally are Send + Sync, and so is it.

0 commit comments

Comments
 (0)