@@ -175,23 +175,18 @@ mod lib {
175175 }
176176
177177 pub use self :: core:: { f32, f64} ;
178- pub use self :: core:: { iter , num , ptr, str} ;
178+ pub use self :: core:: { ptr, str} ;
179179
180180 #[ cfg( any( feature = "std" , feature = "alloc" ) ) ]
181- pub use self :: core:: { cmp , mem , slice} ;
181+ pub use self :: core:: slice;
182182
183- pub use self :: core:: cell:: { Cell , RefCell } ;
184183 pub use self :: core:: clone;
185- pub use self :: core:: cmp:: Reverse ;
186184 pub use self :: core:: convert;
187185 pub use self :: core:: default;
188186 pub use self :: core:: fmt:: { self , Debug , Display , Write as FmtWrite } ;
189187 pub use self :: core:: marker:: { self , PhantomData } ;
190- pub use self :: core:: num:: Wrapping ;
191- pub use self :: core:: ops:: { Bound , Range , RangeFrom , RangeInclusive , RangeTo } ;
192188 pub use self :: core:: option;
193189 pub use self :: core:: result;
194- pub use self :: core:: time:: Duration ;
195190
196191 #[ cfg( all( feature = "alloc" , not( feature = "std" ) ) ) ]
197192 pub use alloc:: borrow:: { Cow , ToOwned } ;
@@ -213,83 +208,15 @@ mod lib {
213208 #[ cfg( feature = "std" ) ]
214209 pub use std:: boxed:: Box ;
215210
216- #[ cfg( all( feature = "rc" , feature = "alloc" , not( feature = "std" ) ) ) ]
217- pub use alloc:: rc:: { Rc , Weak as RcWeak } ;
218- #[ cfg( all( feature = "rc" , feature = "std" ) ) ]
219- pub use std:: rc:: { Rc , Weak as RcWeak } ;
220-
221- #[ cfg( all( feature = "rc" , feature = "alloc" , not( feature = "std" ) ) ) ]
222- pub use alloc:: sync:: { Arc , Weak as ArcWeak } ;
223- #[ cfg( all( feature = "rc" , feature = "std" ) ) ]
224- pub use std:: sync:: { Arc , Weak as ArcWeak } ;
225-
226- #[ cfg( all( feature = "alloc" , not( feature = "std" ) ) ) ]
227- pub use alloc:: collections:: { BTreeMap , BTreeSet , BinaryHeap , LinkedList , VecDeque } ;
228- #[ cfg( feature = "std" ) ]
229- pub use std:: collections:: { BTreeMap , BTreeSet , BinaryHeap , LinkedList , VecDeque } ;
230-
231- #[ cfg( all( not( no_core_cstr) , not( feature = "std" ) ) ) ]
232- pub use self :: core:: ffi:: CStr ;
233- #[ cfg( feature = "std" ) ]
234- pub use std:: ffi:: CStr ;
235-
236- #[ cfg( all( not( no_core_cstr) , feature = "alloc" , not( feature = "std" ) ) ) ]
237- pub use alloc:: ffi:: CString ;
238- #[ cfg( feature = "std" ) ]
239- pub use std:: ffi:: CString ;
240-
241- #[ cfg( all( not( no_core_net) , not( feature = "std" ) ) ) ]
242- pub use self :: core:: net;
243- #[ cfg( feature = "std" ) ]
244- pub use std:: net;
245-
246211 #[ cfg( feature = "std" ) ]
247212 pub use std:: error;
248-
249- #[ cfg( feature = "std" ) ]
250- pub use std:: collections:: { HashMap , HashSet } ;
251- #[ cfg( feature = "std" ) ]
252- pub use std:: ffi:: { OsStr , OsString } ;
253- #[ cfg( feature = "std" ) ]
254- pub use std:: hash:: { BuildHasher , Hash } ;
255- #[ cfg( feature = "std" ) ]
256- pub use std:: io:: Write ;
257- #[ cfg( feature = "std" ) ]
258- pub use std:: path:: { Path , PathBuf } ;
259- #[ cfg( feature = "std" ) ]
260- pub use std:: sync:: { Mutex , RwLock } ;
261- #[ cfg( feature = "std" ) ]
262- pub use std:: time:: { SystemTime , UNIX_EPOCH } ;
263-
264- #[ cfg( all( feature = "std" , no_target_has_atomic, not( no_std_atomic) ) ) ]
265- pub use std:: sync:: atomic:: {
266- AtomicBool , AtomicI16 , AtomicI32 , AtomicI8 , AtomicIsize , AtomicU16 , AtomicU32 , AtomicU8 ,
267- AtomicUsize , Ordering ,
268- } ;
269- #[ cfg( all( feature = "std" , no_target_has_atomic, not( no_std_atomic64) ) ) ]
270- pub use std:: sync:: atomic:: { AtomicI64 , AtomicU64 } ;
271-
272- #[ cfg( all( feature = "std" , not( no_target_has_atomic) ) ) ]
273- pub use std:: sync:: atomic:: Ordering ;
274- #[ cfg( all( feature = "std" , not( no_target_has_atomic) , target_has_atomic = "8" ) ) ]
275- pub use std:: sync:: atomic:: { AtomicBool , AtomicI8 , AtomicU8 } ;
276- #[ cfg( all( feature = "std" , not( no_target_has_atomic) , target_has_atomic = "16" ) ) ]
277- pub use std:: sync:: atomic:: { AtomicI16 , AtomicU16 } ;
278- #[ cfg( all( feature = "std" , not( no_target_has_atomic) , target_has_atomic = "32" ) ) ]
279- pub use std:: sync:: atomic:: { AtomicI32 , AtomicU32 } ;
280- #[ cfg( all( feature = "std" , not( no_target_has_atomic) , target_has_atomic = "64" ) ) ]
281- pub use std:: sync:: atomic:: { AtomicI64 , AtomicU64 } ;
282- #[ cfg( all( feature = "std" , not( no_target_has_atomic) , target_has_atomic = "ptr" ) ) ]
283- pub use std:: sync:: atomic:: { AtomicIsize , AtomicUsize } ;
284-
285- #[ cfg( not( no_core_num_saturating) ) ]
286- pub use self :: core:: num:: Saturating ;
287213}
288214
289215// None of this crate's error handling needs the `From::from` error conversion
290216// performed implicitly by the `?` operator or the standard library's `try!`
291217// macro. This simplified macro gives a 5.5% improvement in compile time
292218// compared to standard `try!`, and 9% improvement compared to `?`.
219+ #[ allow( unused_macros) ]
293220macro_rules! tri {
294221 ( $expr: expr) => {
295222 match $expr {
@@ -301,33 +228,17 @@ macro_rules! tri {
301228
302229////////////////////////////////////////////////////////////////////////////////
303230
304- #[ macro_use]
305- mod macros;
306-
307- #[ macro_use]
308- mod integer128;
309-
310- pub mod de;
311- pub mod ser;
312-
313- mod format;
314-
315231#[ doc( inline) ]
316232pub use crate :: de:: { Deserialize , Deserializer } ;
317233#[ doc( inline) ]
318234pub use crate :: ser:: { Serialize , Serializer } ;
235+ pub use serde_core:: * ;
319236
320237// Used by generated code and doc tests. Not public API.
321238#[ doc( hidden) ]
322239#[ path = "private/mod.rs" ]
323240pub mod __private;
324241
325- #[ path = "de/seed.rs" ]
326- mod seed;
327-
328- #[ cfg( all( not( feature = "std" ) , no_core_error) ) ]
329- mod std_error;
330-
331242// Re-export #[derive(Serialize, Deserialize)].
332243//
333244// The reason re-exporting is not enabled by default is that disabling it would
0 commit comments