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.
This commit is contained in:
commit
d056ea8828
@ -2193,7 +2193,6 @@ pub fn resize_with<F>(&mut self, new_len: usize, f: F)
|
||||
/// 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]
|
||||
|
Loading…
Reference in New Issue
Block a user