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