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 {
6767 #[ bench]
6868 pub fn $name( b: & mut :: test:: Bencher ) {
6969 use std:: rand;
70+ use std:: iter:: IteratorExt ;
7071 use std:: rand:: Rng ;
7172 use test:: black_box;
73+ use vec:: Vec ;
7274
7375 let mut map = $map:: new( ) ;
7476 let n: usize = $n;
Original file line number Diff line number Diff line change @@ -67,6 +67,8 @@ pub use alloc::boxed;
6767#[ macro_use]
6868mod macros;
6969
70+ #[ cfg( test) ] #[ macro_use] mod bench;
71+
7072pub mod binary_heap;
7173mod bit;
7274mod btree;
@@ -104,8 +106,6 @@ pub mod btree_set {
104106}
105107
106108
107- #[ cfg( test) ] #[ macro_use] mod bench;
108-
109109// FIXME(#14344) this shouldn't be necessary
110110#[ doc( hidden) ]
111111pub 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;
8484/// KEY.set(1 as *mut u8);
8585/// }
8686/// ```
87+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
8788pub struct StaticKey {
8889 /// Inner static TLS key (internals), created with by `INIT_INNER` in this
8990 /// module.
91+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
9092 pub inner : StaticKeyInner ,
9193 /// Destructor for the TLS value.
9294 ///
9395 /// See `Key::new` for information about when the destructor runs and how
9496 /// it runs.
97+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
9598 pub dtor : Option < unsafe extern fn ( * mut u8 ) > ,
9699}
97100
@@ -128,6 +131,7 @@ pub struct Key {
128131/// Constant initialization value for static TLS keys.
129132///
130133/// This value specifies no destructor by default.
134+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
131135pub const INIT : StaticKey = StaticKey {
132136 inner : INIT_INNER ,
133137 dtor : None ,
Original file line number Diff line number Diff line change @@ -159,9 +159,7 @@ impl OpenOptions {
159159 flags : 0 ,
160160 read : false ,
161161 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 ,
165163 }
166164 }
167165
Original file line number Diff line number Diff line change @@ -452,6 +452,7 @@ mod imp {
452452 }
453453
454454 #[ doc( hidden) ]
455+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
455456 pub unsafe extern fn destroy_value < T > ( ptr : * mut u8 ) {
456457 let ptr = ptr as * mut Key < T > ;
457458 // Right before we run the user destructor be sure to flag the
@@ -523,6 +524,7 @@ mod imp {
523524 }
524525
525526 #[ doc( hidden) ]
527+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
526528 pub unsafe extern fn destroy_value < T : ' static > ( ptr : * mut u8 ) {
527529 // The OS TLS ensures that this key contains a NULL value when this
528530 // 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 4040#![ feature( hash) ]
4141#![ feature( int_uint) ]
4242#![ feature( io) ]
43- #![ feature( os) ]
4443#![ feature( path) ]
4544#![ feature( rustc_private) ]
4645#![ feature( staged_api) ]
@@ -267,7 +266,7 @@ pub fn test_main(args: &[String], tests: Vec<TestDescAndFn> ) {
267266// semantics into parallel test runners, which in turn requires a ~[]
268267// rather than a &[].
269268pub 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 < _ > > ( ) ;
271270 let owned_tests = tests. iter ( ) . map ( |t| {
272271 match t. testfn {
273272 StaticTestFn ( f) => TestDescAndFn { testfn : StaticTestFn ( f) , desc : t. desc . clone ( ) } ,
You can’t perform that action at this time.
0 commit comments