about summary refs log tree commit diff
path: root/library/alloc/src/vec
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-06-29 18:42:19 +0000
committerbors <bors@rust-lang.org>2022-06-29 18:42:19 +0000
commitddcbba036aee08f0709f98a92a342a278eae5c05 (patch)
tree746cce42c59c782314757a884b2630e8e9d1c1c2 /library/alloc/src/vec
parent3fcf43bb0f3e86c16a88f239da18a1729a94d244 (diff)
parentd34c4ca9be41d14d8eb460f23abb353ce3be8ae7 (diff)
downloadrust-ddcbba036aee08f0709f98a92a342a278eae5c05.tar.gz
rust-ddcbba036aee08f0709f98a92a342a278eae5c05.zip
Auto merge of #98680 - matthiaskrgr:rollup-1bkrrn9, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - #98434 (Ensure that `static_crt` is set in the bootstrapper whenever using `cc-rs` to get a compiler command line.)
 - #98636 (Triagebot: Fix mentions word wrapping.)
 - #98642 (Fix #98260)
 - #98643 (Improve pretty printing of valtrees for references)
 - #98646 (rustdoc: fix bugs in main.js popover help and settings)
 - #98647 (Update cargo)
 - #98652 (`alloc`: clean and ensure `no_global_oom_handling`  builds are warning-free)
 - #98660 (Unbreak stage1 tests via ignore-stage1 in `proc-macro/invalid-punct-ident-1.rs`.)
 - #98665 (Use verbose help for deprecation suggestion)
 - #98668 (Avoid some `&str` to `String` conversions with `MultiSpan::push_span_label`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/alloc/src/vec')
-rw-r--r--library/alloc/src/vec/into_iter.rs2
1 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 9b84a1d9b4b..28979457b7f 100644
--- a/library/alloc/src/vec/into_iter.rs
+++ b/library/alloc/src/vec/into_iter.rs
@@ -9,6 +9,7 @@ use core::iter::{
 };
 use core::marker::PhantomData;
 use core::mem::{self, ManuallyDrop};
+#[cfg(not(no_global_oom_handling))]
 use core::ops::Deref;
 use core::ptr::{self, NonNull};
 use core::slice::{self};
@@ -123,6 +124,7 @@ impl<T, A: Allocator> IntoIter<T, A> {
     }
 
     /// Forgets to Drop the remaining elements while still allowing the backing allocation to be freed.
+    #[cfg(not(no_global_oom_handling))]
     pub(crate) fn forget_remaining_elements(&mut self) {
         self.ptr = self.end;
     }