#![cfg_attr(feature = "alloc", feature(allocator_api))]
#![cfg_attr(not(RUSTC_LINT_REASONS_IS_STABLE), feature(lint_reasons))]
#[test]
#[cfg(feature = "alloc")]
#[cfg_attr(any(miri, NO_ALLOC_FAIL_TESTS, target_os = "macos"), ignore)]
fn too_big_in_place() {
use core::alloc::AllocError;
use pinned_init::*;
use std::sync::Arc;
assert!(matches!(
Box::init(init_zeroed::<[u8; 1024 * 1024 * 1024 * 1024]>()),
Err(AllocError)
));
assert!(matches!(
Arc::init(init_zeroed::<[u8; 1024 * 1024 * 1024 * 1024]>()),
Err(AllocError)
));
}