]> git.proxmox.com Git - rustc.git/blame - library/core/src/prelude/v1.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / library / core / src / prelude / v1.rs
CommitLineData
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 10pub use crate::marker::{Copy, Send, Sized, Sync, Unpin};
92a42be0 11#[stable(feature = "core_prelude", since = "1.4.0")]
c30ab7b3 12#[doc(no_inline)]
48663c56 13pub 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 18pub 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 23pub use crate::clone::Clone;
92a42be0 24#[stable(feature = "core_prelude", since = "1.4.0")]
c30ab7b3 25#[doc(no_inline)]
60c5eb7d 26pub use crate::cmp::{Eq, Ord, PartialEq, PartialOrd};
92a42be0 27#[stable(feature = "core_prelude", since = "1.4.0")]
c30ab7b3 28#[doc(no_inline)]
60c5eb7d 29pub use crate::convert::{AsMut, AsRef, From, Into};
92a42be0 30#[stable(feature = "core_prelude", since = "1.4.0")]
c30ab7b3 31#[doc(no_inline)]
48663c56 32pub use crate::default::Default;
92a42be0 33#[stable(feature = "core_prelude", since = "1.4.0")]
c30ab7b3 34#[doc(no_inline)]
60c5eb7d 35pub use crate::iter::{DoubleEndedIterator, ExactSizeIterator};
92a42be0 36#[stable(feature = "core_prelude", since = "1.4.0")]
c30ab7b3 37#[doc(no_inline)]
60c5eb7d 38pub use crate::iter::{Extend, IntoIterator, Iterator};
92a42be0 39#[stable(feature = "core_prelude", since = "1.4.0")]
c30ab7b3 40#[doc(no_inline)]
60c5eb7d 41pub use crate::option::Option::{self, None, Some};
92a42be0 42#[stable(feature = "core_prelude", since = "1.4.0")]
c30ab7b3 43#[doc(no_inline)]
60c5eb7d 44pub 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)]
49pub use crate::fmt::macros::Debug;
416331ca
XL
50#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
51#[doc(no_inline)]
52pub 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)]
57pub use crate::{
136023e0 58 assert, cfg, column, compile_error, concat, concat_idents, env, file, format_args,
5099ac24
FG
59 format_args_nl, include, include_bytes, include_str, line, log_syntax, module_path, option_env,
60 stringify, trace_macros,
416331ca
XL
61};
62
136023e0 63#[unstable(
a2a8927a
XL
64 feature = "concat_bytes",
65 issue = "87555",
66 reason = "`concat_bytes` is not stable enough for use and is subject to change"
136023e0
XL
67)]
68#[doc(no_inline)]
a2a8927a 69pub use crate::concat_bytes;
136023e0 70
a2a8927a 71// Do not `doc(inline)` these `doc(hidden)` items.
416331ca 72#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
a2a8927a
XL
73#[allow(deprecated)]
74pub use crate::macros::builtin::{RustcDecodable, RustcEncodable};
ba9703b0 75
a2a8927a
XL
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).
487cf647
FG
78#[cfg(not(bootstrap))]
79#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
80pub use crate::macros::builtin::alloc_error_handler;
6a06907d 81#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
a2a8927a 82pub use crate::macros::builtin::{bench, derive, global_allocator, test, test_case};
6a06907d 83
487cf647
FG
84#[unstable(feature = "derive_const", issue = "none")]
85#[cfg(not(bootstrap))]
86pub use crate::macros::builtin::derive_const;
87
ba9703b0
XL
88#[unstable(
89 feature = "cfg_accessible",
90 issue = "64797",
91 reason = "`cfg_accessible` is not fully implemented"
92)]
ba9703b0 93pub use crate::macros::builtin::cfg_accessible;
6a06907d 94
6a06907d
XL
95#[unstable(
96 feature = "cfg_eval",
97 issue = "82679",
98 reason = "`cfg_eval` is a recently implemented feature"
99)]
6a06907d 100pub use crate::macros::builtin::cfg_eval;
487cf647
FG
101
102#[unstable(
103 feature = "type_ascription",
104 issue = "23416",
105 reason = "placeholder syntax for type ascription"
106)]
107#[cfg(not(bootstrap))]
108pub use crate::macros::builtin::type_ascribe;