1 //! The first version of the prelude of The Rust Standard Library.
3 //! See the [module-level documentation](super) for more.
5 #![stable(feature = "rust1", since = "1.0.0")]
7 // Re-exported core operators
8 #[stable(feature = "rust1", since = "1.0.0")]
10 pub use crate::marker::{Send, Sized, Sync, Unpin};
11 #[stable(feature = "rust1", since = "1.0.0")]
13 pub use crate::ops::{Drop, Fn, FnMut, FnOnce};
15 // Re-exported functions
16 #[stable(feature = "rust1", since = "1.0.0")]
18 pub use crate::mem::drop;
20 // Re-exported types and traits
21 #[stable(feature = "rust1", since = "1.0.0")]
23 pub use crate::convert::{AsMut, AsRef, From, Into};
24 #[stable(feature = "rust1", since = "1.0.0")]
26 pub use crate::iter::{DoubleEndedIterator, ExactSizeIterator};
27 #[stable(feature = "rust1", since = "1.0.0")]
29 pub use crate::iter::{Extend, IntoIterator, Iterator};
30 #[stable(feature = "rust1", since = "1.0.0")]
32 pub use crate::option::Option::{self, None, Some};
33 #[stable(feature = "rust1", since = "1.0.0")]
35 pub use crate::result::Result::{self, Err, Ok};
37 // Re-exported built-in macros
38 #[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
41 pub use core::prelude::v1::{
42 asm, assert, cfg, column, compile_error, concat, concat_idents, env, file, format_args,
43 format_args_nl, global_asm, include, include_bytes, include_str, line, llvm_asm, log_syntax,
44 module_path, option_env, stringify, trace_macros, Clone, Copy, Debug, Default, Eq, Hash, Ord,
45 PartialEq, PartialOrd,
48 // FIXME: Attribute and internal derive macros are not documented because for them rustdoc generates
49 // dead links which fail link checker testing.
50 #[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
51 #[allow(deprecated, deprecated_in_future)]
53 pub use core::prelude::v1::{
54 bench, global_allocator, test, test_case, RustcDecodable, RustcEncodable,
57 #[cfg(not(bootstrap))]
58 #[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
60 pub use core::prelude::v1::derive;
63 feature = "cfg_accessible",
65 reason = "`cfg_accessible` is not fully implemented"
68 pub use core::prelude::v1::cfg_accessible;
70 #[cfg(not(bootstrap))]
74 reason = "`cfg_eval` is a recently implemented feature"
77 pub use core::prelude::v1::cfg_eval;
79 // The file so far is equivalent to src/libcore/prelude/v1.rs,
80 // and below to src/liballoc/prelude.rs.
81 // Those files are duplicated rather than using glob imports
82 // because we want docs to show these re-exports as pointing to within `std`.
84 #[stable(feature = "rust1", since = "1.0.0")]
86 pub use crate::borrow::ToOwned;
87 #[stable(feature = "rust1", since = "1.0.0")]
89 pub use crate::boxed::Box;
90 #[stable(feature = "rust1", since = "1.0.0")]
92 pub use crate::string::{String, ToString};
93 #[stable(feature = "rust1", since = "1.0.0")]
95 pub use crate::vec::Vec;