File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7373 const_fn_trait_bound,
7474 const_option,
7575 destructuring_assignment,
76+ doc_cfg,
77+ doc_cfg_hide,
7678 drain_filter,
7779 generic_associated_types,
7880 io_slice_advance,
105107#![ cfg_attr( test, deny( warnings) ) ]
106108// Disallow warnings in examples, we want to set a good example after all.
107109#![ doc( test( attr( deny( warnings) ) ) ) ]
110+ // The `cfg(any(test, feature = "test"))` attribute creates a doc element
111+ // staying that it's only supporting "using test or test", that is a bit
112+ // confusing. So we hide those parts and instead manually replace all of them
113+ // with: `doc(cfg(feature = "test"))`. That will stay it's only supported using
114+ // the test feature.
115+ #![ doc( cfg_hide( any( test, feature = "test" ) ) ) ]
108116
109117#[ cfg( not( any( target_os = "linux" , target_os = "freebsd" , target_os = "macos" ) ) ) ]
110118compile_error ! ( "Heph currently only supports Linux, FreeBSD and macOS." ) ;
@@ -121,6 +129,7 @@ pub mod rt;
121129pub mod spawn;
122130pub mod supervisor;
123131#[ cfg( any( test, feature = "test" ) ) ]
132+ #[ doc( cfg( feature = "test" ) ) ]
124133pub mod test;
125134pub mod timer;
126135pub mod trace;
Original file line number Diff line number Diff line change @@ -8,11 +8,11 @@ use crate::rt::shared::RuntimeInternals;
88use crate :: rt:: { ptr_as_usize, ProcessId } ;
99
1010/// Maximum number of runtimes supported.
11- pub const MAX_RUNTIMES : usize = 1 << MAX_RUNTIMES_BITS ;
11+ pub ( crate ) const MAX_RUNTIMES : usize = 1 << MAX_RUNTIMES_BITS ;
1212#[ cfg( not( any( test, feature = "test" ) ) ) ]
13- pub const MAX_RUNTIMES_BITS : usize = 0 ; // 1.
13+ pub ( crate ) const MAX_RUNTIMES_BITS : usize = 0 ; // 1.
1414#[ cfg( any( test, feature = "test" ) ) ]
15- pub const MAX_RUNTIMES_BITS : usize = 5 ; // 32.
15+ pub ( crate ) const MAX_RUNTIMES_BITS : usize = 5 ; // 32.
1616
1717/// An id for a waker.
1818///
You can’t perform that action at this time.
0 commit comments