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 = "rust1", since = "1.0.0")]
7#[doc(no_inline)]
8pub use crate::marker::{Send, Sized, Sync, Unpin};
9#[stable(feature = "rust1", since = "1.0.0")]
10#[doc(no_inline)]
11pub use crate::ops::{Drop, Fn, FnMut, FnOnce};
12
13// Re-exported functions
14#[stable(feature = "rust1", since = "1.0.0")]
15#[doc(no_inline)]
16pub use crate::mem::drop;
17
18// Re-exported types and traits
19#[stable(feature = "rust1", since = "1.0.0")]
20#[doc(no_inline)]
21pub use crate::convert::{AsMut, AsRef, From, Into};
22#[stable(feature = "rust1", since = "1.0.0")]
23#[doc(no_inline)]
24pub use crate::iter::{DoubleEndedIterator, ExactSizeIterator};
25#[stable(feature = "rust1", since = "1.0.0")]
26#[doc(no_inline)]
27pub use crate::iter::{Extend, IntoIterator, Iterator};
28#[stable(feature = "rust1", since = "1.0.0")]
29#[doc(no_inline)]
30pub use crate::option::Option::{self, None, Some};
31#[stable(feature = "rust1", since = "1.0.0")]
32#[doc(no_inline)]
33pub use crate::result::Result::{self, Err, Ok};
34
35// Re-exported built-in macros
36#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
37#[allow(deprecated)]
38#[doc(no_inline)]
39pub use core::prelude::v1::{
40 assert, cfg, column, compile_error, concat, concat_idents, env, file, format_args,
41 format_args_nl, include, include_bytes, include_str, line, log_syntax, module_path, option_env,
42 stringify, trace_macros, Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd,
43};
44
45#[unstable(
46 feature = "concat_bytes",
47 issue = "87555",
48 reason = "`concat_bytes` is not stable enough for use and is subject to change"
49)]
50#[doc(no_inline)]
51pub use core::prelude::v1::concat_bytes;
52
53// Do not `doc(no_inline)` so that they become doc items on their own
54// (no public module for them to be re-exported from).
55#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
56pub use core::prelude::v1::{
57 alloc_error_handler, bench, derive, global_allocator, test, test_case,
58};
59
60#[unstable(feature = "derive_const", issue = "none")]
61pub use core::prelude::v1::derive_const;
62
63// Do not `doc(no_inline)` either.
64#[unstable(
65 feature = "cfg_accessible",
66 issue = "64797",
67 reason = "`cfg_accessible` is not fully implemented"
68)]
69pub use core::prelude::v1::cfg_accessible;
70
71// Do not `doc(no_inline)` either.
72#[unstable(
73 feature = "cfg_eval",
74 issue = "82679",
75 reason = "`cfg_eval` is a recently implemented feature"
76)]
77pub use core::prelude::v1::cfg_eval;
78
79// Do not `doc(no_inline)` either.
80#[unstable(
81 feature = "type_ascription",
82 issue = "23416",
83 reason = "placeholder syntax for type ascription"
84)]
85pub use core::prelude::v1::type_ascribe;
86
87#[cfg(not(bootstrap))]
88// Do not `doc(no_inline)` either.
89#[unstable(
90 feature = "deref_patterns",
91 issue = "87121",
92 reason = "placeholder syntax for deref patterns"
93)]
94pub use core::prelude::v1::deref;
95
96// The file so far is equivalent to core/src/prelude/v1.rs. It is duplicated
97// rather than glob imported because we want docs to show these re-exports as
98// pointing to within `std`.
99// Below are the items from the alloc crate.
100
101#[stable(feature = "rust1", since = "1.0.0")]
102#[doc(no_inline)]
103pub use crate::borrow::ToOwned;
104#[stable(feature = "rust1", since = "1.0.0")]
105#[doc(no_inline)]
106pub use crate::boxed::Box;
107#[stable(feature = "rust1", since = "1.0.0")]
108#[doc(no_inline)]
109pub use crate::string::{String, ToString};
110#[stable(feature = "rust1", since = "1.0.0")]
111#[doc(no_inline)]
112pub use crate::vec::Vec;
113