-extern crate crossbeam_utils;
-
use std::sync::atomic::AtomicUsize;
use std::sync::atomic::Ordering::SeqCst;
assert_eq!(AtomicCell::<u128>::is_lock_free(), cfg!(has_atomic_u128));
}
+#[test]
+fn const_is_lock_free() {
+ const _U: bool = AtomicCell::<usize>::is_lock_free();
+ const _I: bool = AtomicCell::<isize>::is_lock_free();
+}
+
#[test]
fn drops_unit() {
static CNT: AtomicUsize = AtomicUsize::new(0);
println!();
}
-#[cfg(has_min_const_fn)]
#[test]
fn const_atomic_cell_new() {
static CELL: AtomicCell<usize> = AtomicCell::new(0);