about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-10-19 14:05:53 +0530
committerGitHub <noreply@github.com>2022-10-19 14:05:53 +0530
commitd056ea8828b2b589ffe58caa3b539320309f9379 (patch)
tree8cec5b7b16dec174eef60928b91845eaf728eef4
parentf4afb9d9ec4a8b787acd477c9f3984d0db82087b (diff)
parent913393a0f704a8aefd21fa1ad5f35eb23a1655ed (diff)
downloadrust-d056ea8828b2b589ffe58caa3b539320309f9379.tar.gz
rust-d056ea8828b2b589ffe58caa3b539320309f9379.zip
Rollup merge of #103153 - ChrisDenton:leak-oom, r=m-ou-se
Allow `Vec::leak` when using `no_global_oom_handling`

As [the documentation notes](https://doc.rust-lang.org/std/vec/struct.Vec.html#method.leak), `Vec::leak` hasn't allocated since 1.57.

cc `@Ericson2314` in case I'm missing something.
-rw-r--r--library/alloc/src/vec/mod.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs
index b2bb7a5b2e6..b5b2eb0ece0 100644
--- a/library/alloc/src/vec/mod.rs
+++ b/library/alloc/src/vec/mod.rs
@@ -2193,7 +2193,6 @@ impl<T, A: Allocator> Vec<T, A> {
     /// static_ref[0] += 1;
     /// assert_eq!(static_ref, &[2, 2, 3]);
     /// ```
-    #[cfg(not(no_global_oom_handling))]
     #[stable(feature = "vec_leak", since = "1.47.0")]
     #[inline]
     pub fn leak<'a>(self) -> &'a mut [T]