File tree 3 files changed +7
-7
lines changed
3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ use std::hash::{self, Hash};
5
5
use std:: path:: Path ;
6
6
use std:: ptr;
7
7
use std:: sync:: atomic:: Ordering :: SeqCst ;
8
- use std:: sync:: atomic:: { AtomicBool , ATOMIC_BOOL_INIT } ;
8
+ use std:: sync:: atomic:: AtomicBool ;
9
9
use std:: sync:: Mutex ;
10
10
11
11
use log:: trace;
@@ -193,7 +193,7 @@ impl SourceId {
193
193
config. crates_io_source_id ( || {
194
194
let cfg = ops:: registry_configuration ( config, None ) ?;
195
195
let url = if let Some ( ref index) = cfg. index {
196
- static WARNED : AtomicBool = ATOMIC_BOOL_INIT ;
196
+ static WARNED : AtomicBool = AtomicBool :: new ( false ) ;
197
197
if !WARNED . swap ( true , SeqCst ) {
198
198
config. shell ( ) . warn (
199
199
"custom registry support via \
Original file line number Diff line number Diff line change 1
1
use std:: env;
2
2
use std:: process:: Command ;
3
- use std:: sync:: atomic:: { AtomicBool , Ordering , ATOMIC_BOOL_INIT } ;
3
+ use std:: sync:: atomic:: { AtomicBool , Ordering } ;
4
4
use std:: sync:: { Once , ONCE_INIT } ;
5
5
6
6
use crate :: support:: { basic_bin_manifest, main_file, project} ;
@@ -22,7 +22,7 @@ pub fn disabled() -> bool {
22
22
// It's not particularly common to have a cross-compilation setup, so
23
23
// try to detect that before we fail a bunch of tests through no fault
24
24
// of the user.
25
- static CAN_RUN_CROSS_TESTS : AtomicBool = ATOMIC_BOOL_INIT ;
25
+ static CAN_RUN_CROSS_TESTS : AtomicBool = AtomicBool :: new ( false ) ;
26
26
static CHECK : Once = ONCE_INIT ;
27
27
28
28
let cross_target = alternate ( ) ;
@@ -56,7 +56,7 @@ pub fn disabled() -> bool {
56
56
// pass. We don't use std::sync::Once here because panicing inside its
57
57
// call_once method would poison the Once instance, which is not what
58
58
// we want.
59
- static HAVE_WARNED : AtomicBool = ATOMIC_BOOL_INIT ;
59
+ static HAVE_WARNED : AtomicBool = AtomicBool :: new ( false ) ;
60
60
61
61
if HAVE_WARNED . swap ( true , Ordering :: SeqCst ) {
62
62
// We are some other test and somebody else is handling the warning.
Original file line number Diff line number Diff line change @@ -3,13 +3,13 @@ use std::env;
3
3
use std:: fs;
4
4
use std:: io:: { self , ErrorKind } ;
5
5
use std:: path:: { Path , PathBuf } ;
6
- use std:: sync:: atomic:: { AtomicUsize , Ordering , ATOMIC_USIZE_INIT } ;
6
+ use std:: sync:: atomic:: { AtomicUsize , Ordering } ;
7
7
use std:: sync:: { Once , ONCE_INIT } ;
8
8
9
9
use filetime:: { self , FileTime } ;
10
10
11
11
static CARGO_INTEGRATION_TEST_DIR : & ' static str = "cit" ;
12
- static NEXT_ID : AtomicUsize = ATOMIC_USIZE_INIT ;
12
+ static NEXT_ID : AtomicUsize = AtomicUsize :: new ( 0 ) ;
13
13
14
14
thread_local ! ( static TASK_ID : usize = NEXT_ID . fetch_add( 1 , Ordering :: SeqCst ) ) ;
15
15
You can’t perform that action at this time.
0 commit comments