diff options
| author | bors <bors@rust-lang.org> | 2021-09-26 19:36:00 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-09-26 19:36:00 +0000 |
| commit | 05044c2e6c043929a11537d7f6169eb3a2397bb8 (patch) | |
| tree | ad74f466ebb0a828cf2ef5827c726e7fa41c7c3f /library/alloc/src/vec | |
| parent | c09d6374324ee23cb5a4fe738f74369717dd642d (diff) | |
| parent | 994793faabba1c490d108504b428ac653433ae44 (diff) | |
| download | rust-05044c2e6c043929a11537d7f6169eb3a2397bb8.tar.gz rust-05044c2e6c043929a11537d7f6169eb3a2397bb8.zip | |
Auto merge of #89144 - sexxi-goose:insig_stdlib, r=nikomatsakis
2229: Mark insignificant dtor in stdlib I looked at all public [stdlib Drop implementations](https://doc.rust-lang.org/stable/std/ops/trait.Drop.html#implementors) and categorized them into Insigificant/Maybe/Significant Drop. Reasons are noted here: https://docs.google.com/spreadsheets/d/19edb9r5lo2UqMrCOVjV0fwcSdS-R7qvKNL76q7tO8VA/edit#gid=1838773501 One thing missing from this PR is tagging HashMap as insigificant destructor as that needs some discussion. r? `@Mark-Simulacrum` cc `@nikomatsakis`
Diffstat (limited to 'library/alloc/src/vec')
| -rw-r--r-- | library/alloc/src/vec/into_iter.rs | 1 | ||||
| -rw-r--r-- | library/alloc/src/vec/mod.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/library/alloc/src/vec/into_iter.rs b/library/alloc/src/vec/into_iter.rs index 0bd152f17a6..4cb0a4b10bd 100644 --- a/library/alloc/src/vec/into_iter.rs +++ b/library/alloc/src/vec/into_iter.rs @@ -22,6 +22,7 @@ use core::slice::{self}; /// let iter: std::vec::IntoIter<_> = v.into_iter(); /// ``` #[stable(feature = "rust1", since = "1.0.0")] +#[rustc_insignificant_dtor] pub struct IntoIter< T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global, diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index 4440b1f599f..c37ec375561 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -396,6 +396,7 @@ mod spec_extend; /// [owned slice]: Box #[stable(feature = "rust1", since = "1.0.0")] #[cfg_attr(not(test), rustc_diagnostic_item = "vec_type")] +#[rustc_insignificant_dtor] pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> { buf: RawVec<T, A>, len: usize, |
