This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ thread_local! {
136136 arena: arena:: Arena :: new( ) ,
137137 names: fxhash:: FxHashMap :: default ( ) ,
138138 strings: Vec :: new( ) ,
139- // Start with a base of 1 to make sure that `NonZeroU32 ` works.
139+ // Start with a base of 1 to make sure that `NonZero<u32> ` works.
140140 sym_base: NonZero :: new( 1 ) . unwrap( ) ,
141141 } ) ;
142142}
Original file line number Diff line number Diff line change 11//! Helper module which helps to determine amount of threads to be used
22//! during tests execution.
3- use std:: { env, num:: NonZeroUsize , thread} ;
3+ use std:: { env, num:: NonZero , thread} ;
44
55pub fn get_concurrency ( ) -> usize {
66 if let Ok ( value) = env:: var ( "RUST_TEST_THREADS" ) {
7- match value. parse :: < NonZeroUsize > ( ) . ok ( ) {
7+ match value. parse :: < NonZero < usize > > ( ) . ok ( ) {
88 Some ( n) => n. get ( ) ,
99 _ => panic ! ( "RUST_TEST_THREADS is `{value}`, should be a positive integer." ) ,
1010 }
Original file line number Diff line number Diff line change 1717#![ unstable( feature = "test" , issue = "50297" ) ]
1818#![ doc( test( attr( deny( warnings) ) ) ) ]
1919#![ doc( rust_logo) ]
20+ #![ feature( generic_nonzero) ]
2021#![ feature( rustdoc_internals) ]
2122#![ feature( internal_output_capture) ]
2223#![ feature( staged_api) ]
You can’t perform that action at this time.
0 commit comments