1 | //! The first version of the core prelude. |
2 | //! |
3 | //! See the [module-level documentation](super) for more. |
4 | |
5 | #![stable (feature = "core_prelude" , since = "1.4.0" )] |
6 | |
7 | // Re-exported core operators |
8 | #[stable (feature = "core_prelude" , since = "1.4.0" )] |
9 | #[doc (no_inline)] |
10 | pub use crate::marker::{Copy, Send, Sized, Sync, Unpin}; |
11 | #[stable (feature = "core_prelude" , since = "1.4.0" )] |
12 | #[doc (no_inline)] |
13 | pub use crate::ops::{Drop, Fn, FnMut, FnOnce}; |
14 | |
15 | // Re-exported functions |
16 | #[stable (feature = "core_prelude" , since = "1.4.0" )] |
17 | #[doc (no_inline)] |
18 | pub use crate::mem::drop; |
19 | |
20 | // Re-exported types and traits |
21 | #[stable (feature = "core_prelude" , since = "1.4.0" )] |
22 | #[doc (no_inline)] |
23 | pub use crate::clone::Clone; |
24 | #[stable (feature = "core_prelude" , since = "1.4.0" )] |
25 | #[doc (no_inline)] |
26 | pub use crate::cmp::{Eq, Ord, PartialEq, PartialOrd}; |
27 | #[stable (feature = "core_prelude" , since = "1.4.0" )] |
28 | #[doc (no_inline)] |
29 | pub use crate::convert::{AsMut, AsRef, From, Into}; |
30 | #[stable (feature = "core_prelude" , since = "1.4.0" )] |
31 | #[doc (no_inline)] |
32 | pub use crate::default::Default; |
33 | #[stable (feature = "core_prelude" , since = "1.4.0" )] |
34 | #[doc (no_inline)] |
35 | pub use crate::iter::{DoubleEndedIterator, ExactSizeIterator}; |
36 | #[stable (feature = "core_prelude" , since = "1.4.0" )] |
37 | #[doc (no_inline)] |
38 | pub use crate::iter::{Extend, IntoIterator, Iterator}; |
39 | #[stable (feature = "core_prelude" , since = "1.4.0" )] |
40 | #[doc (no_inline)] |
41 | pub use crate::option::Option::{self, None, Some}; |
42 | #[stable (feature = "core_prelude" , since = "1.4.0" )] |
43 | #[doc (no_inline)] |
44 | pub use crate::result::Result::{self, Err, Ok}; |
45 | |
46 | // Re-exported built-in macros |
47 | #[stable (feature = "builtin_macro_prelude" , since = "1.38.0" )] |
48 | #[doc (no_inline)] |
49 | pub use crate::fmt::macros::Debug; |
50 | #[stable (feature = "builtin_macro_prelude" , since = "1.38.0" )] |
51 | #[doc (no_inline)] |
52 | pub use crate::hash::macros::Hash; |
53 | |
54 | #[stable (feature = "builtin_macro_prelude" , since = "1.38.0" )] |
55 | #[allow (deprecated)] |
56 | #[doc (no_inline)] |
57 | pub use crate::{ |
58 | assert, cfg, column, compile_error, concat, concat_idents, env, file, format_args, |
59 | format_args_nl, include, include_bytes, include_str, line, log_syntax, module_path, option_env, |
60 | stringify, trace_macros, |
61 | }; |
62 | |
63 | #[unstable ( |
64 | feature = "concat_bytes" , |
65 | issue = "87555" , |
66 | reason = "`concat_bytes` is not stable enough for use and is subject to change" |
67 | )] |
68 | #[doc (no_inline)] |
69 | pub use crate::concat_bytes; |
70 | |
71 | // Do not `doc(inline)` these `doc(hidden)` items. |
72 | #[stable (feature = "builtin_macro_prelude" , since = "1.38.0" )] |
73 | #[allow (deprecated)] |
74 | pub use crate::macros::builtin::{RustcDecodable, RustcEncodable}; |
75 | |
76 | // Do not `doc(no_inline)` so that they become doc items on their own |
77 | // (no public module for them to be re-exported from). |
78 | #[stable (feature = "builtin_macro_prelude" , since = "1.38.0" )] |
79 | pub use crate::macros::builtin::{ |
80 | alloc_error_handler, bench , derive , global_allocator , test , test_case , |
81 | }; |
82 | |
83 | #[unstable (feature = "derive_const" , issue = "none" )] |
84 | pub use crate::macros::builtin::derive_const ; |
85 | |
86 | #[unstable ( |
87 | feature = "cfg_accessible" , |
88 | issue = "64797" , |
89 | reason = "`cfg_accessible` is not fully implemented" |
90 | )] |
91 | pub use crate::macros::builtin::cfg_accessible ; |
92 | |
93 | #[unstable ( |
94 | feature = "cfg_eval" , |
95 | issue = "82679" , |
96 | reason = "`cfg_eval` is a recently implemented feature" |
97 | )] |
98 | pub use crate::macros::builtin::cfg_eval ; |
99 | |
100 | #[unstable ( |
101 | feature = "type_ascription" , |
102 | issue = "23416" , |
103 | reason = "placeholder syntax for type ascription" |
104 | )] |
105 | pub use crate::macros::builtin::type_ascribe; |
106 | |