1 //! The first version of the core prelude.
3 //! See the [module-level documentation](super) for more.
5 #![stable(feature = "core_prelude", since = "1.4.0")]
7 // Re-exported core operators
8 #[stable(feature = "core_prelude", since = "1.4.0")]
10 pub use crate::marker::{Copy, Send, Sized, Sync, Unpin};
11 #[stable(feature = "core_prelude", since = "1.4.0")]
13 pub use crate::ops::{Drop, Fn, FnMut, FnOnce};
15 // Re-exported functions
16 #[stable(feature = "core_prelude", since = "1.4.0")]
18 pub use crate::mem::drop;
20 // Re-exported types and traits
21 #[stable(feature = "core_prelude", since = "1.4.0")]
23 pub use crate::clone::Clone;
24 #[stable(feature = "core_prelude", since = "1.4.0")]
26 pub use crate::cmp::{Eq, Ord, PartialEq, PartialOrd};
27 #[stable(feature = "core_prelude", since = "1.4.0")]
29 pub use crate::convert::{AsMut, AsRef, From, Into};
30 #[stable(feature = "core_prelude", since = "1.4.0")]
32 pub use crate::default::Default;
33 #[stable(feature = "core_prelude", since = "1.4.0")]
35 pub use crate::iter::{DoubleEndedIterator, ExactSizeIterator};
36 #[stable(feature = "core_prelude", since = "1.4.0")]
38 pub use crate::iter::{Extend, IntoIterator, Iterator};
39 #[stable(feature = "core_prelude", since = "1.4.0")]
41 pub use crate::option::Option::{self, None, Some};
42 #[stable(feature = "core_prelude", since = "1.4.0")]
44 pub use crate::result::Result::{self, Err, Ok};
46 // Re-exported built-in macros
47 #[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
49 pub use crate::fmt::macros::Debug;
50 #[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
52 pub use crate::hash::macros::Hash;
54 #[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
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,
64 feature = "concat_bytes",
66 reason = "`concat_bytes` is not stable enough for use and is subject to change"
69 pub use crate::concat_bytes;
71 // Do not `doc(inline)` these `doc(hidden)` items.
72 #[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
74 pub use crate::macros::builtin::{RustcDecodable, RustcEncodable};
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,
83 #[unstable(feature = "derive_const", issue = "none")]
84 pub use crate::macros::builtin::derive_const;
87 feature = "cfg_accessible",
89 reason = "`cfg_accessible` is not fully implemented"
91 pub use crate::macros::builtin::cfg_accessible;
96 reason = "`cfg_eval` is a recently implemented feature"
98 pub use crate::macros::builtin::cfg_eval;
101 feature = "type_ascription",
103 reason = "placeholder syntax for type ascription"
105 pub use crate::macros::builtin::type_ascribe;