Rollup merge of #130914 - compiler-errors:insignificant-dtor, r=Amanieu · qinheping/verify-rust-std@3c9808b (original) (raw)
4 files changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -228,6 +228,7 @@ mod thin; | ||
228 | 228 | #[lang = "owned_box"] |
229 | 229 | #[fundamental] |
230 | 230 | #[stable(feature = "rust1", since = "1.0.0")] |
231 | +#[rustc_insignificant_dtor] | |
231 | 232 | // The declaration of the `Box` struct must be kept in sync with the |
232 | 233 | // compiler or ICEs will happen. |
233 | 234 | pub struct Box< |
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 |
---|---|---|
@@ -237,6 +237,7 @@ macro_rules! acquire { | ||
237 | 237 | /// [rc_examples]: crate::rc#examples |
238 | 238 | #[cfg_attr(not(test), rustc_diagnostic_item = "Arc")] |
239 | 239 | #[stable(feature = "rust1", since = "1.0.0")] |
240 | +#[rustc_insignificant_dtor] | |
240 | 241 | pub struct Arc< |
241 | 242 | T: ?Sized, |
242 | 243 | #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global, |
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. |