Skip to content

Commit d056ea8

Browse files
authored
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.
2 parents f4afb9d + 913393a commit d056ea8

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

Diff for: library/alloc/src/vec/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2193,7 +2193,6 @@ impl<T, A: Allocator> Vec<T, A> {
21932193
/// static_ref[0] += 1;
21942194
/// assert_eq!(static_ref, &[2, 2, 3]);
21952195
/// ```
2196-
#[cfg(not(no_global_oom_handling))]
21972196
#[stable(feature = "vec_leak", since = "1.47.0")]
21982197
#[inline]
21992198
pub fn leak<'a>(self) -> &'a mut [T]

0 commit comments

Comments
 (0)