File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 73
73
const_fn_trait_bound,
74
74
const_option,
75
75
destructuring_assignment,
76
+ doc_cfg,
77
+ doc_cfg_hide,
76
78
drain_filter,
77
79
generic_associated_types,
78
80
io_slice_advance,
105
107
#![ cfg_attr( test, deny( warnings) ) ]
106
108
// Disallow warnings in examples, we want to set a good example after all.
107
109
#![ 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" ) ) ) ]
108
116
109
117
#[ cfg( not( any( target_os = "linux" , target_os = "freebsd" , target_os = "macos" ) ) ) ]
110
118
compile_error ! ( "Heph currently only supports Linux, FreeBSD and macOS." ) ;
@@ -121,6 +129,7 @@ pub mod rt;
121
129
pub mod spawn;
122
130
pub mod supervisor;
123
131
#[ cfg( any( test, feature = "test" ) ) ]
132
+ #[ doc( cfg( feature = "test" ) ) ]
124
133
pub mod test;
125
134
pub mod timer;
126
135
pub mod trace;
Original file line number Diff line number Diff line change @@ -8,11 +8,11 @@ use crate::rt::shared::RuntimeInternals;
8
8
use crate :: rt:: { ptr_as_usize, ProcessId } ;
9
9
10
10
/// 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 ;
12
12
#[ 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.
14
14
#[ cfg( any( test, feature = "test" ) ) ]
15
- pub const MAX_RUNTIMES_BITS : usize = 5 ; // 32.
15
+ pub ( crate ) const MAX_RUNTIMES_BITS : usize = 5 ; // 32.
16
16
17
17
/// An id for a waker.
18
18
///
You can’t perform that action at this time.
0 commit comments