Skip to content

Commit 0118ed6

Browse files
tbu-sanstzu
authored andcommitted
Revert bump in the minimum supported Rust version
Being able to call `const fn` on stable is a relatively new addition. CC rust-lang#1075
1 parent ddb439e commit 0118ed6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ctest/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,7 @@ impl TestGenerator {
743743
t!(gen.rust.write_all(br#"
744744
use std::any::{Any, TypeId};
745745
use std::mem;
746+
use std::sync::atomic::{ATOMIC_BOOL_INIT, ATOMIC_USIZE_INIT};
746747
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
747748
748749
fn main() {
@@ -779,8 +780,8 @@ impl TestGenerator {
779780
}
780781
p! { i8 i16 i32 i64 u8 u16 u32 u64 usize isize }
781782
782-
static FAILED: AtomicBool = AtomicBool::new(false);
783-
static NTESTS: AtomicUsize = AtomicUsize::new(0);
783+
static FAILED: AtomicBool = ATOMIC_BOOL_INIT;
784+
static NTESTS: AtomicUsize = ATOMIC_USIZE_INIT;
784785
785786
fn same<T: Eq + Pretty>(rust: T, c: T, attr: &str) {
786787
if rust != c {

0 commit comments

Comments
 (0)