@@ -180,23 +180,18 @@ mod lib {
180180 }
181181
182182 pub use self :: core:: { f32, f64} ;
183- pub use self :: core:: { iter , num , ptr, str} ;
183+ pub use self :: core:: { ptr, str} ;
184184
185185 #[ cfg( any( feature = "std" , feature = "alloc" ) ) ]
186- pub use self :: core:: { cmp , mem , slice} ;
186+ pub use self :: core:: slice;
187187
188- pub use self :: core:: cell:: { Cell , RefCell } ;
189188 pub use self :: core:: clone;
190- pub use self :: core:: cmp:: Reverse ;
191189 pub use self :: core:: convert;
192190 pub use self :: core:: default;
193191 pub use self :: core:: fmt:: { self , Debug , Display , Write as FmtWrite } ;
194192 pub use self :: core:: marker:: { self , PhantomData } ;
195- pub use self :: core:: num:: Wrapping ;
196- pub use self :: core:: ops:: { Bound , Range , RangeFrom , RangeInclusive , RangeTo } ;
197193 pub use self :: core:: option;
198194 pub use self :: core:: result;
199- pub use self :: core:: time:: Duration ;
200195
201196 #[ cfg( all( feature = "alloc" , not( feature = "std" ) ) ) ]
202197 pub use alloc:: borrow:: { Cow , ToOwned } ;
@@ -218,83 +213,15 @@ mod lib {
218213 #[ cfg( feature = "std" ) ]
219214 pub use std:: boxed:: Box ;
220215
221- #[ cfg( all( feature = "rc" , feature = "alloc" , not( feature = "std" ) ) ) ]
222- pub use alloc:: rc:: { Rc , Weak as RcWeak } ;
223- #[ cfg( all( feature = "rc" , feature = "std" ) ) ]
224- pub use std:: rc:: { Rc , Weak as RcWeak } ;
225-
226- #[ cfg( all( feature = "rc" , feature = "alloc" , not( feature = "std" ) ) ) ]
227- pub use alloc:: sync:: { Arc , Weak as ArcWeak } ;
228- #[ cfg( all( feature = "rc" , feature = "std" ) ) ]
229- pub use std:: sync:: { Arc , Weak as ArcWeak } ;
230-
231- #[ cfg( all( feature = "alloc" , not( feature = "std" ) ) ) ]
232- pub use alloc:: collections:: { BTreeMap , BTreeSet , BinaryHeap , LinkedList , VecDeque } ;
233- #[ cfg( feature = "std" ) ]
234- pub use std:: collections:: { BTreeMap , BTreeSet , BinaryHeap , LinkedList , VecDeque } ;
235-
236- #[ cfg( all( not( no_core_cstr) , not( feature = "std" ) ) ) ]
237- pub use self :: core:: ffi:: CStr ;
238- #[ cfg( feature = "std" ) ]
239- pub use std:: ffi:: CStr ;
240-
241- #[ cfg( all( not( no_core_cstr) , feature = "alloc" , not( feature = "std" ) ) ) ]
242- pub use alloc:: ffi:: CString ;
243- #[ cfg( feature = "std" ) ]
244- pub use std:: ffi:: CString ;
245-
246- #[ cfg( all( not( no_core_net) , not( feature = "std" ) ) ) ]
247- pub use self :: core:: net;
248- #[ cfg( feature = "std" ) ]
249- pub use std:: net;
250-
251216 #[ cfg( feature = "std" ) ]
252217 pub use std:: error;
253-
254- #[ cfg( feature = "std" ) ]
255- pub use std:: collections:: { HashMap , HashSet } ;
256- #[ cfg( feature = "std" ) ]
257- pub use std:: ffi:: { OsStr , OsString } ;
258- #[ cfg( feature = "std" ) ]
259- pub use std:: hash:: { BuildHasher , Hash } ;
260- #[ cfg( feature = "std" ) ]
261- pub use std:: io:: Write ;
262- #[ cfg( feature = "std" ) ]
263- pub use std:: path:: { Path , PathBuf } ;
264- #[ cfg( feature = "std" ) ]
265- pub use std:: sync:: { Mutex , RwLock } ;
266- #[ cfg( feature = "std" ) ]
267- pub use std:: time:: { SystemTime , UNIX_EPOCH } ;
268-
269- #[ cfg( all( feature = "std" , no_target_has_atomic, not( no_std_atomic) ) ) ]
270- pub use std:: sync:: atomic:: {
271- AtomicBool , AtomicI16 , AtomicI32 , AtomicI8 , AtomicIsize , AtomicU16 , AtomicU32 , AtomicU8 ,
272- AtomicUsize , Ordering ,
273- } ;
274- #[ cfg( all( feature = "std" , no_target_has_atomic, not( no_std_atomic64) ) ) ]
275- pub use std:: sync:: atomic:: { AtomicI64 , AtomicU64 } ;
276-
277- #[ cfg( all( feature = "std" , not( no_target_has_atomic) ) ) ]
278- pub use std:: sync:: atomic:: Ordering ;
279- #[ cfg( all( feature = "std" , not( no_target_has_atomic) , target_has_atomic = "8" ) ) ]
280- pub use std:: sync:: atomic:: { AtomicBool , AtomicI8 , AtomicU8 } ;
281- #[ cfg( all( feature = "std" , not( no_target_has_atomic) , target_has_atomic = "16" ) ) ]
282- pub use std:: sync:: atomic:: { AtomicI16 , AtomicU16 } ;
283- #[ cfg( all( feature = "std" , not( no_target_has_atomic) , target_has_atomic = "32" ) ) ]
284- pub use std:: sync:: atomic:: { AtomicI32 , AtomicU32 } ;
285- #[ cfg( all( feature = "std" , not( no_target_has_atomic) , target_has_atomic = "64" ) ) ]
286- pub use std:: sync:: atomic:: { AtomicI64 , AtomicU64 } ;
287- #[ cfg( all( feature = "std" , not( no_target_has_atomic) , target_has_atomic = "ptr" ) ) ]
288- pub use std:: sync:: atomic:: { AtomicIsize , AtomicUsize } ;
289-
290- #[ cfg( not( no_core_num_saturating) ) ]
291- pub use self :: core:: num:: Saturating ;
292218}
293219
294220// None of this crate's error handling needs the `From::from` error conversion
295221// performed implicitly by the `?` operator or the standard library's `try!`
296222// macro. This simplified macro gives a 5.5% improvement in compile time
297223// compared to standard `try!`, and 9% improvement compared to `?`.
224+ #[ allow( unused_macros) ]
298225macro_rules! tri {
299226 ( $expr: expr) => {
300227 match $expr {
@@ -306,33 +233,17 @@ macro_rules! tri {
306233
307234////////////////////////////////////////////////////////////////////////////////
308235
309- #[ macro_use]
310- mod macros;
311-
312- #[ macro_use]
313- mod integer128;
314-
315- pub mod de;
316- pub mod ser;
317-
318- mod format;
319-
320236#[ doc( inline) ]
321237pub use crate :: de:: { Deserialize , Deserializer } ;
322238#[ doc( inline) ]
323239pub use crate :: ser:: { Serialize , Serializer } ;
240+ pub use serde_core:: * ;
324241
325242// Used by generated code and doc tests. Not public API.
326243#[ doc( hidden) ]
327244#[ path = "private/mod.rs" ]
328245pub mod __private;
329246
330- #[ path = "de/seed.rs" ]
331- mod seed;
332-
333- #[ cfg( all( not( feature = "std" ) , no_core_error) ) ]
334- mod std_error;
335-
336247// Re-export #[derive(Serialize, Deserialize)].
337248//
338249// The reason re-exporting is not enabled by default is that disabling it would
0 commit comments