Skip to content

Commit

Permalink
Merge pull request torvalds#501 from AltF02/try_pin
Browse files Browse the repository at this point in the history
rust: add `try_pin` under `no_global_oom_handling`
  • Loading branch information
ojeda committed Sep 28, 2021
2 parents 335d42e + 13c31e6 commit f104b42
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions rust/alloc/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ use core::marker::{PhantomData, Unpin, Unsize};
use core::mem::size_of_val;
use core::mem::{self, align_of_val_raw};
use core::ops::{CoerceUnsized, Deref, DispatchFromDyn, Receiver};
#[cfg(not(no_global_oom_handling))]
use core::pin::Pin;
use core::ptr::{self, NonNull};
#[cfg(not(no_global_oom_handling))]
Expand Down Expand Up @@ -497,7 +496,6 @@ impl<T> Arc<T> {
}

/// Constructs a new `Pin<Arc<T>>`, return an error if allocation fails.
#[cfg(not(no_global_oom_handling))]
#[unstable(feature = "allocator_api", issue = "32838")]
#[inline]
pub fn try_pin(data: T) -> Result<Pin<Arc<T>>, AllocError> {
Expand Down

0 comments on commit f104b42

Please sign in to comment.