File tree Expand file tree Collapse file tree 6 files changed +12
-7
lines changed Expand file tree Collapse file tree 6 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -67,8 +67,10 @@ macro_rules! map_find_rand_bench {
67
67
#[ bench]
68
68
pub fn $name( b: & mut :: test:: Bencher ) {
69
69
use std:: rand;
70
+ use std:: iter:: IteratorExt ;
70
71
use std:: rand:: Rng ;
71
72
use test:: black_box;
73
+ use vec:: Vec ;
72
74
73
75
let mut map = $map:: new( ) ;
74
76
let n: usize = $n;
Original file line number Diff line number Diff line change @@ -67,6 +67,8 @@ pub use alloc::boxed;
67
67
#[ macro_use]
68
68
mod macros;
69
69
70
+ #[ cfg( test) ] #[ macro_use] mod bench;
71
+
70
72
pub mod binary_heap;
71
73
mod bit;
72
74
mod btree;
@@ -104,8 +106,6 @@ pub mod btree_set {
104
106
}
105
107
106
108
107
- #[ cfg( test) ] #[ macro_use] mod bench;
108
-
109
109
// FIXME(#14344) this shouldn't be necessary
110
110
#[ doc( hidden) ]
111
111
pub fn fixme_14344_be_sure_to_link_to_collections ( ) { }
Original file line number Diff line number Diff line change @@ -84,14 +84,17 @@ use sys::thread_local as imp;
84
84
/// KEY.set(1 as *mut u8);
85
85
/// }
86
86
/// ```
87
+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
87
88
pub struct StaticKey {
88
89
/// Inner static TLS key (internals), created with by `INIT_INNER` in this
89
90
/// module.
91
+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
90
92
pub inner : StaticKeyInner ,
91
93
/// Destructor for the TLS value.
92
94
///
93
95
/// See `Key::new` for information about when the destructor runs and how
94
96
/// it runs.
97
+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
95
98
pub dtor : Option < unsafe extern fn ( * mut u8 ) > ,
96
99
}
97
100
@@ -128,6 +131,7 @@ pub struct Key {
128
131
/// Constant initialization value for static TLS keys.
129
132
///
130
133
/// This value specifies no destructor by default.
134
+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
131
135
pub const INIT : StaticKey = StaticKey {
132
136
inner : INIT_INNER ,
133
137
dtor : None ,
Original file line number Diff line number Diff line change @@ -159,9 +159,7 @@ impl OpenOptions {
159
159
flags : 0 ,
160
160
read : false ,
161
161
write : false ,
162
- mode : libc:: S_IRUSR | libc:: S_IWUSR
163
- | libc:: S_IRGRP | libc:: S_IWGRP
164
- | libc:: S_IROTH | libc:: S_IWOTH ,
162
+ mode : 0o666 ,
165
163
}
166
164
}
167
165
Original file line number Diff line number Diff line change @@ -452,6 +452,7 @@ mod imp {
452
452
}
453
453
454
454
#[ doc( hidden) ]
455
+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
455
456
pub unsafe extern fn destroy_value < T > ( ptr : * mut u8 ) {
456
457
let ptr = ptr as * mut Key < T > ;
457
458
// Right before we run the user destructor be sure to flag the
@@ -523,6 +524,7 @@ mod imp {
523
524
}
524
525
525
526
#[ doc( hidden) ]
527
+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
526
528
pub unsafe extern fn destroy_value < T : ' static > ( ptr : * mut u8 ) {
527
529
// The OS TLS ensures that this key contains a NULL value when this
528
530
// destructor starts to run. We set it back to a sentinel value of 1 to
Original file line number Diff line number Diff line change 40
40
#![ feature( hash) ]
41
41
#![ feature( int_uint) ]
42
42
#![ feature( io) ]
43
- #![ feature( os) ]
44
43
#![ feature( path) ]
45
44
#![ feature( rustc_private) ]
46
45
#![ feature( staged_api) ]
@@ -267,7 +266,7 @@ pub fn test_main(args: &[String], tests: Vec<TestDescAndFn> ) {
267
266
// semantics into parallel test runners, which in turn requires a ~[]
268
267
// rather than a &[].
269
268
pub fn test_main_static ( args : env:: Args , tests : & [ TestDescAndFn ] ) {
270
- let args = args. map ( |s| s . into_string ( ) . unwrap ( ) ) . collect :: < Vec < _ > > ( ) ;
269
+ let args = args. collect :: < Vec < _ > > ( ) ;
271
270
let owned_tests = tests. iter ( ) . map ( |t| {
272
271
match t. testfn {
273
272
StaticTestFn ( f) => TestDescAndFn { testfn : StaticTestFn ( f) , desc : t. desc . clone ( ) } ,
You can’t perform that action at this time.
0 commit comments