]> git.proxmox.com Git - cargo.git/blobdiff - vendor/crossbeam-utils/tests/atomic_cell.rs
New upstream version 0.52.0
[cargo.git] / vendor / crossbeam-utils / tests / atomic_cell.rs
index e0b7db525b652ebd847aeae7f199b5536d8abbe2..3d91d81d69589ea3770b42cbc9002ed51494ba59 100644 (file)
@@ -1,5 +1,3 @@
-extern crate crossbeam_utils;
-
 use std::sync::atomic::AtomicUsize;
 use std::sync::atomic::Ordering::SeqCst;
 
@@ -24,6 +22,12 @@ fn is_lock_free() {
     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);
@@ -223,7 +227,6 @@ fn garbage_padding() {
     println!();
 }
 
-#[cfg(has_min_const_fn)]
 #[test]
 fn const_atomic_cell_new() {
     static CELL: AtomicCell<usize> = AtomicCell::new(0);