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