1 //! The first version of the prelude of The Rust Standard Library.
3 //! See the [module-level documentation](../index.html) 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")]
40 pub use core::prelude::v1::{
41 asm, assert, cfg, column, compile_error, concat, concat_idents, env, file, format_args,
42 format_args_nl, global_asm, include, include_bytes, include_str, line, log_syntax, module_path,
43 option_env, stringify, trace_macros,
46 // FIXME: Attribute and derive macros are not documented because for them rustdoc generates
47 // dead links which fail link checker testing.
48 #[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
51 pub use core::prelude::v1::{
52 bench, global_allocator, test, test_case, Clone, Copy, Debug, Default, Eq, Hash, Ord,
53 PartialEq, PartialOrd, RustcDecodable, RustcEncodable,
56 // The file so far is equivalent to src/libcore/prelude/v1.rs,
57 // and below to src/liballoc/prelude.rs.
58 // Those files are duplicated rather than using glob imports
59 // because we want docs to show these re-exports as pointing to within `std`.
61 #[stable(feature = "rust1", since = "1.0.0")]
63 pub use crate::borrow::ToOwned;
64 #[stable(feature = "rust1", since = "1.0.0")]
66 pub use crate::boxed::Box;
67 #[stable(feature = "rust1", since = "1.0.0")]
69 pub use crate::string::{String, ToString};
70 #[stable(feature = "rust1", since = "1.0.0")]
72 pub use crate::vec::Vec;