File tree 3 files changed +4
-3
lines changed
3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ thread_local! {
136
136
arena: arena:: Arena :: new( ) ,
137
137
names: fxhash:: FxHashMap :: default ( ) ,
138
138
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.
140
140
sym_base: NonZero :: new( 1 ) . unwrap( ) ,
141
141
} ) ;
142
142
}
Original file line number Diff line number Diff line change 1
1
//! Helper module which helps to determine amount of threads to be used
2
2
//! during tests execution.
3
- use std:: { env, num:: NonZeroUsize , thread} ;
3
+ use std:: { env, num:: NonZero , thread} ;
4
4
5
5
pub fn get_concurrency ( ) -> usize {
6
6
if let Ok ( value) = env:: var ( "RUST_TEST_THREADS" ) {
7
- match value. parse :: < NonZeroUsize > ( ) . ok ( ) {
7
+ match value. parse :: < NonZero < usize > > ( ) . ok ( ) {
8
8
Some ( n) => n. get ( ) ,
9
9
_ => panic ! ( "RUST_TEST_THREADS is `{value}`, should be a positive integer." ) ,
10
10
}
Original file line number Diff line number Diff line change 17
17
#![ unstable( feature = "test" , issue = "50297" ) ]
18
18
#![ doc( test( attr( deny( warnings) ) ) ) ]
19
19
#![ doc( rust_logo) ]
20
+ #![ feature( generic_nonzero) ]
20
21
#![ feature( rustdoc_internals) ]
21
22
#![ feature( internal_output_capture) ]
22
23
#![ feature( staged_api) ]
You can’t perform that action at this time.
0 commit comments