Mark some more types as having insignificant dtor · qinheping/verify-rust-std@118d2e4 (original) (raw)
2 files changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -696,6 +696,7 @@ impl CString { | ||
696 | 696 | // memory-unsafe code from working by accident. Inline |
697 | 697 | // to prevent LLVM from optimizing it away in debug builds. |
698 | 698 | #[stable(feature = "cstring_drop", since = "1.13.0")] |
699 | +#[rustc_insignificant_dtor] | |
699 | 700 | impl Drop for CString { |
700 | 701 | #[inline] |
701 | 702 | fn drop(&mut self) { |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -124,6 +124,7 @@ const TAG_SIMPLE: usize = 0b11; | ||
124 | 124 | /// is_unwind_safe::std::io::Error(); |
125 | 125 | /// ``` |
126 | 126 | #[repr(transparent)] |
127 | +#[rustc_insignificant_dtor] | |
127 | 128 | pub(super) struct Repr(NonNull<()>, PhantomData<ErrorData<Box<Custom>>>); |
128 | 129 | |
129 | 130 | // All the types `Repr` stores internally are Send + Sync, and so is it. |