Skip to content

Commit f104b42

Browse files
authored
Merge pull request #501 from AltF02/try_pin
rust: add `try_pin` under `no_global_oom_handling`
2 parents 335d42e + 13c31e6 commit f104b42

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

rust/alloc/sync.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ use core::marker::{PhantomData, Unpin, Unsize};
2121
use core::mem::size_of_val;
2222
use core::mem::{self, align_of_val_raw};
2323
use core::ops::{CoerceUnsized, Deref, DispatchFromDyn, Receiver};
24-
#[cfg(not(no_global_oom_handling))]
2524
use core::pin::Pin;
2625
use core::ptr::{self, NonNull};
2726
#[cfg(not(no_global_oom_handling))]
@@ -497,7 +496,6 @@ impl<T> Arc<T> {
497496
}
498497

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

0 commit comments

Comments
 (0)