@@ -132,12 +132,12 @@ macro_rules! crate_root {
132
132
} ;
133
133
}
134
134
135
- #[ cfg_attr( no_serde_core , path = "core/de/mod.rs" ) ]
135
+ #[ cfg_attr( all ( docsrs , if_docsrs_then_no_serde_core ) , path = "core/de/mod.rs" ) ]
136
136
pub mod de;
137
- #[ cfg_attr( no_serde_core , path = "core/ser/mod.rs" ) ]
137
+ #[ cfg_attr( all ( docsrs , if_docsrs_then_no_serde_core ) , path = "core/ser/mod.rs" ) ]
138
138
pub mod ser;
139
139
140
- #[ cfg_attr( no_serde_core , path = "core/format.rs" ) ]
140
+ #[ cfg_attr( all ( docsrs , if_docsrs_then_no_serde_core ) , path = "core/format.rs" ) ]
141
141
mod format;
142
142
143
143
#[ doc( inline) ]
@@ -147,7 +147,10 @@ macro_rules! crate_root {
147
147
148
148
// Used by generated code. Not public API.
149
149
#[ doc( hidden) ]
150
- #[ cfg_attr( no_serde_core, path = "core/private/mod.rs" ) ]
150
+ #[ cfg_attr(
151
+ all( docsrs, if_docsrs_then_no_serde_core) ,
152
+ path = "core/private/mod.rs"
153
+ ) ]
151
154
mod private;
152
155
153
156
// Used by declarative macro generated code. Not public API.
@@ -162,7 +165,7 @@ macro_rules! crate_root {
162
165
include!( concat!( env!( "OUT_DIR" ) , "/private.rs" ) ) ;
163
166
164
167
#[ cfg( all( not( feature = "std" ) , no_core_error) ) ]
165
- #[ cfg_attr( no_serde_core , path = "core/std_error.rs" ) ]
168
+ #[ cfg_attr( all ( docsrs , if_docsrs_then_no_serde_core ) , path = "core/std_error.rs" ) ]
166
169
mod std_error;
167
170
} ;
168
171
}
0 commit comments