xref: /drstd/src/std/prelude/v1.rs (revision 86982c5e9b2eaa583327251616ee822c36288824)
1 //! The first version of the prelude of The Rust Standard Library.
2 //!
3 //! See the [module-level documentation](super) for more.
4 
5 // Re-exported core operators
6 #[doc(no_inline)]
7 pub use crate::std::marker::{Send, Sized, Sync, Unpin};
8 #[doc(no_inline)]
9 pub use crate::std::ops::{Drop, Fn, FnMut, FnOnce};
10 
11 // Re-exported functions
12 #[doc(no_inline)]
13 pub use crate::std::mem::drop;
14 
15 // Re-exported types and traits
16 #[doc(no_inline)]
17 pub use crate::std::convert::{AsMut, AsRef, From, Into};
18 #[doc(no_inline)]
19 pub use crate::std::iter::{DoubleEndedIterator, ExactSizeIterator};
20 #[doc(no_inline)]
21 pub use crate::std::iter::{Extend, IntoIterator, Iterator};
22 #[doc(no_inline)]
23 pub use crate::std::option::Option::{self, None, Some};
24 #[doc(no_inline)]
25 pub use crate::std::result::Result::{self, Err, Ok};
26 
27 // Re-exported built-in macros
28 #[allow(deprecated)]
29 #[doc(no_inline)]
30 pub use core::prelude::v1::{
31     assert, cfg, column, compile_error, concat, concat_idents, env, file, format_args,
32     format_args_nl, include, include_bytes, include_str, line, log_syntax, module_path, option_env,
33     stringify, trace_macros, Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd,
34 };
35 
36 #[doc(no_inline)]
37 pub use core::prelude::v1::concat_bytes;
38 
39 // Do not `doc(inline)` these `doc(hidden)` items.
40 #[allow(deprecated)]
41 pub use core::prelude::v1::{RustcDecodable, RustcEncodable};
42 
43 // Do not `doc(no_inline)` so that they become doc items on their own
44 // (no public module for them to be re-exported from).
45 pub use core::prelude::v1::{alloc_error_handler, derive, global_allocator, test, test_case};
46 
47 pub use core::prelude::v1::derive_const;
48 
49 // Do not `doc(no_inline)` either.
50 pub use core::prelude::v1::cfg_accessible;
51 
52 // Do not `doc(no_inline)` either.
53 pub use core::prelude::v1::cfg_eval;
54 
55 // Do not `doc(no_inline)` either.
56 pub use core::prelude::v1::type_ascribe;
57 
58 // The file so far is equivalent to core/src/prelude/v1.rs. It is duplicated
59 // rather than glob imported because we want docs to show these re-exports as
60 // pointing to within `std`.
61 // Below are the items from the alloc crate.
62 
63 #[doc(no_inline)]
64 pub use crate::std::borrow::ToOwned;
65 #[doc(no_inline)]
66 pub use crate::std::boxed::Box;
67 #[doc(no_inline)]
68 pub use crate::std::string::{String, ToString};
69 #[doc(no_inline)]
70 pub use crate::std::vec::Vec;
71