We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ddb439e commit 0118ed6Copy full SHA for 0118ed6
ctest/src/lib.rs
@@ -743,6 +743,7 @@ impl TestGenerator {
743
t!(gen.rust.write_all(br#"
744
use std::any::{Any, TypeId};
745
use std::mem;
746
+ use std::sync::atomic::{ATOMIC_BOOL_INIT, ATOMIC_USIZE_INIT};
747
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
748
749
fn main() {
@@ -779,8 +780,8 @@ impl TestGenerator {
779
780
}
781
p! { i8 i16 i32 i64 u8 u16 u32 u64 usize isize }
782
- static FAILED: AtomicBool = AtomicBool::new(false);
783
- static NTESTS: AtomicUsize = AtomicUsize::new(0);
+ static FAILED: AtomicBool = ATOMIC_BOOL_INIT;
784
+ static NTESTS: AtomicUsize = ATOMIC_USIZE_INIT;
785
786
fn same<T: Eq + Pretty>(rust: T, c: T, attr: &str) {
787
if rust != c {
0 commit comments