File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ use std::hash::{self, Hash};
55use std:: path:: Path ;
66use std:: ptr;
77use std:: sync:: atomic:: Ordering :: SeqCst ;
8- use std:: sync:: atomic:: { AtomicBool , ATOMIC_BOOL_INIT } ;
8+ use std:: sync:: atomic:: AtomicBool ;
99use std:: sync:: Mutex ;
1010
1111use log:: trace;
@@ -193,7 +193,7 @@ impl SourceId {
193193 config. crates_io_source_id ( || {
194194 let cfg = ops:: registry_configuration ( config, None ) ?;
195195 let url = if let Some ( ref index) = cfg. index {
196- static WARNED : AtomicBool = ATOMIC_BOOL_INIT ;
196+ static WARNED : AtomicBool = AtomicBool :: new ( false ) ;
197197 if !WARNED . swap ( true , SeqCst ) {
198198 config. shell ( ) . warn (
199199 "custom registry support via \
Original file line number Diff line number Diff line change @@ -679,8 +679,8 @@ fn output_not_captured() {
679679
680680 p. cargo ( "doc" )
681681 . without_status ( )
682- . with_stderr_contains ( "1 | ☃" )
683- . with_stderr_contains ( r"error: unknown start of token: \u{2603}" )
682+ . with_stderr_contains ( "[..] ☃" )
683+ . with_stderr_contains ( r"[..] unknown start of token: \u{2603}" )
684684 . run ( ) ;
685685}
686686
Original file line number Diff line number Diff line change 11use std:: env;
22use std:: process:: Command ;
3- use std:: sync:: atomic:: { AtomicBool , Ordering , ATOMIC_BOOL_INIT } ;
3+ use std:: sync:: atomic:: { AtomicBool , Ordering } ;
44use std:: sync:: { Once , ONCE_INIT } ;
55
66use crate :: support:: { basic_bin_manifest, main_file, project} ;
@@ -22,7 +22,7 @@ pub fn disabled() -> bool {
2222 // It's not particularly common to have a cross-compilation setup, so
2323 // try to detect that before we fail a bunch of tests through no fault
2424 // of the user.
25- static CAN_RUN_CROSS_TESTS : AtomicBool = ATOMIC_BOOL_INIT ;
25+ static CAN_RUN_CROSS_TESTS : AtomicBool = AtomicBool :: new ( false ) ;
2626 static CHECK : Once = ONCE_INIT ;
2727
2828 let cross_target = alternate ( ) ;
@@ -56,7 +56,7 @@ pub fn disabled() -> bool {
5656 // pass. We don't use std::sync::Once here because panicing inside its
5757 // call_once method would poison the Once instance, which is not what
5858 // we want.
59- static HAVE_WARNED : AtomicBool = ATOMIC_BOOL_INIT ;
59+ static HAVE_WARNED : AtomicBool = AtomicBool :: new ( false ) ;
6060
6161 if HAVE_WARNED . swap ( true , Ordering :: SeqCst ) {
6262 // 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;
33use std:: fs;
44use std:: io:: { self , ErrorKind } ;
55use std:: path:: { Path , PathBuf } ;
6- use std:: sync:: atomic:: { AtomicUsize , Ordering , ATOMIC_USIZE_INIT } ;
6+ use std:: sync:: atomic:: { AtomicUsize , Ordering } ;
77use std:: sync:: { Once , ONCE_INIT } ;
88
99use filetime:: { self , FileTime } ;
1010
1111static CARGO_INTEGRATION_TEST_DIR : & ' static str = "cit" ;
12- static NEXT_ID : AtomicUsize = ATOMIC_USIZE_INIT ;
12+ static NEXT_ID : AtomicUsize = AtomicUsize :: new ( 0 ) ;
1313
1414thread_local ! ( static TASK_ID : usize = NEXT_ID . fetch_add( 1 , Ordering :: SeqCst ) ) ;
1515
You can’t perform that action at this time.
0 commit comments