1//! The first version of the core prelude.
2//!
3//! See the [module-level documentation](super) for more.
45#![stable(feature = "core_prelude", since = "1.4.0")]
67// No formatting: this file is nothing but re-exports, and their order is worth preserving.
8#![cfg_attr(rustfmt, rustfmt::skip)]
910// Re-exported core operators
11#[stable(feature = "core_prelude", since = "1.4.0")]
12#[doc(no_inline)]
13pub use crate::marker::{Copy, Send, Sized, Sync, Unpin};
14#[stable(feature = "core_prelude", since = "1.4.0")]
15#[doc(no_inline)]
16pub use crate::ops::{Drop, Fn, FnMut, FnOnce};
17#[stable(feature = "async_closure", since = "1.85.0")]
18#[doc(no_inline)]
19pub use crate::ops::{AsyncFn, AsyncFnMut, AsyncFnOnce};
2021// Re-exported functions
22#[stable(feature = "core_prelude", since = "1.4.0")]
23#[doc(no_inline)]
24pub use crate::mem::drop;
25#[stable(feature = "size_of_prelude", since = "1.80.0")]
26#[doc(no_inline)]
27pub use crate::mem::{align_of, align_of_val, size_of, size_of_val};
2829// Re-exported types and traits
30#[stable(feature = "core_prelude", since = "1.4.0")]
31#[doc(no_inline)]
32pub use crate::clone::Clone;
33#[stable(feature = "core_prelude", since = "1.4.0")]
34#[doc(no_inline)]
35pub use crate::cmp::{Eq, Ord, PartialEq, PartialOrd};
36#[stable(feature = "core_prelude", since = "1.4.0")]
37#[doc(no_inline)]
38pub use crate::convert::{AsMut, AsRef, From, Into};
39#[stable(feature = "core_prelude", since = "1.4.0")]
40#[doc(no_inline)]
41pub use crate::default::Default;
42#[stable(feature = "core_prelude", since = "1.4.0")]
43#[doc(no_inline)]
44pub use crate::iter::{DoubleEndedIterator, ExactSizeIterator, Extend, IntoIterator, Iterator};
45#[stable(feature = "core_prelude", since = "1.4.0")]
46#[doc(no_inline)]
47pub use crate::option::Option::{self, None, Some};
48#[stable(feature = "core_prelude", since = "1.4.0")]
49#[doc(no_inline)]
50pub use crate::result::Result::{self, Err, Ok};
5152// Re-exported built-in macros
53#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
54#[doc(no_inline)]
55pub use crate::fmt::macros::Debug;
56#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
57#[doc(no_inline)]
58pub use crate::hash::macros::Hash;
5960#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
61#[allow(deprecated)]
62#[doc(no_inline)]
63pub use crate::{
64 assert, cfg, column, compile_error, concat, concat_idents, env, file, format_args,
65 format_args_nl, include, include_bytes, include_str, line, log_syntax, module_path, option_env,
66 stringify, trace_macros,
67};
6869#[unstable(
70 feature = "concat_bytes",
71 issue = "87555",
72 reason = "`concat_bytes` is not stable enough for use and is subject to change"
73)]
74#[doc(no_inline)]
75pub use crate::concat_bytes;
7677// Do not `doc(no_inline)` so that they become doc items on their own
78// (no public module for them to be re-exported from).
79#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
80pub use crate::macros::builtin::{
81 alloc_error_handler, bench, derive, global_allocator, test, test_case,
82};
8384#[unstable(feature = "derive_const", issue = "none")]
85pub use crate::macros::builtin::derive_const;
8687#[unstable(
88 feature = "cfg_accessible",
89 issue = "64797",
90 reason = "`cfg_accessible` is not fully implemented"
91)]
92pub use crate::macros::builtin::cfg_accessible;
9394#[unstable(
95 feature = "cfg_eval",
96 issue = "82679",
97 reason = "`cfg_eval` is a recently implemented feature"
98)]
99pub use crate::macros::builtin::cfg_eval;
100101#[unstable(
102 feature = "type_ascription",
103 issue = "23416",
104 reason = "placeholder syntax for type ascription"
105)]
106pub use crate::macros::builtin::type_ascribe;
107108#[unstable(
109 feature = "deref_patterns",
110 issue = "87121",
111 reason = "placeholder syntax for deref patterns"
112)]
113pub use crate::macros::builtin::deref;
114115#[unstable(
116 feature = "type_alias_impl_trait",
117 issue = "63063",
118 reason = "`type_alias_impl_trait` has open design concerns"
119)]
120#[cfg(not(bootstrap))]
121pub use crate::macros::builtin::define_opaque;