]> git.lizzy.rs Git - rust.git/blob - library/std/src/prelude/v1.rs
use jemallocator in rustc/rustdoc
[rust.git] / library / std / src / prelude / v1.rs
1 //! The first version of the prelude of The Rust Standard Library.
2 //!
3 //! See the [module-level documentation](super) for more.
4
5 #![stable(feature = "rust1", since = "1.0.0")]
6
7 // Re-exported core operators
8 #[stable(feature = "rust1", since = "1.0.0")]
9 #[doc(no_inline)]
10 pub use crate::marker::{Send, Sized, Sync, Unpin};
11 #[stable(feature = "rust1", since = "1.0.0")]
12 #[doc(no_inline)]
13 pub use crate::ops::{Drop, Fn, FnMut, FnOnce};
14
15 // Re-exported functions
16 #[stable(feature = "rust1", since = "1.0.0")]
17 #[doc(no_inline)]
18 pub use crate::mem::drop;
19
20 // Re-exported types and traits
21 #[stable(feature = "rust1", since = "1.0.0")]
22 #[doc(no_inline)]
23 pub use crate::convert::{AsMut, AsRef, From, Into};
24 #[stable(feature = "rust1", since = "1.0.0")]
25 #[doc(no_inline)]
26 pub use crate::iter::{DoubleEndedIterator, ExactSizeIterator};
27 #[stable(feature = "rust1", since = "1.0.0")]
28 #[doc(no_inline)]
29 pub use crate::iter::{Extend, IntoIterator, Iterator};
30 #[stable(feature = "rust1", since = "1.0.0")]
31 #[doc(no_inline)]
32 pub use crate::option::Option::{self, None, Some};
33 #[stable(feature = "rust1", since = "1.0.0")]
34 #[doc(no_inline)]
35 pub use crate::result::Result::{self, Err, Ok};
36
37 // Re-exported built-in macros
38 #[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
39 #[allow(deprecated)]
40 #[doc(no_inline)]
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,
46 };
47
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)]
52 #[doc(hidden)]
53 pub use core::prelude::v1::{
54     bench, global_allocator, test, test_case, RustcDecodable, RustcEncodable,
55 };
56
57 #[cfg(not(bootstrap))]
58 #[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
59 #[doc(hidden)]
60 pub use core::prelude::v1::derive;
61
62 #[unstable(
63     feature = "cfg_accessible",
64     issue = "64797",
65     reason = "`cfg_accessible` is not fully implemented"
66 )]
67 #[doc(hidden)]
68 pub use core::prelude::v1::cfg_accessible;
69
70 #[cfg(not(bootstrap))]
71 #[unstable(
72     feature = "cfg_eval",
73     issue = "82679",
74     reason = "`cfg_eval` is a recently implemented feature"
75 )]
76 #[doc(hidden)]
77 pub use core::prelude::v1::cfg_eval;
78
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`.
83
84 #[stable(feature = "rust1", since = "1.0.0")]
85 #[doc(no_inline)]
86 pub use crate::borrow::ToOwned;
87 #[stable(feature = "rust1", since = "1.0.0")]
88 #[doc(no_inline)]
89 pub use crate::boxed::Box;
90 #[stable(feature = "rust1", since = "1.0.0")]
91 #[doc(no_inline)]
92 pub use crate::string::{String, ToString};
93 #[stable(feature = "rust1", since = "1.0.0")]
94 #[doc(no_inline)]
95 pub use crate::vec::Vec;