]> git.lizzy.rs Git - rust.git/blob - src/libstd/prelude/v1.rs
Update const_forget.rs
[rust.git] / src / libstd / prelude / v1.rs
1 //! The first version of the prelude of The Rust Standard Library.
2 //!
3 //! See the [module-level documentation](../index.html) 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 #[doc(no_inline)]
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,
44 };
45
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")]
49 #[allow(deprecated)]
50 #[doc(hidden)]
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,
54 };
55
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`.
60
61 #[stable(feature = "rust1", since = "1.0.0")]
62 #[doc(no_inline)]
63 pub use crate::borrow::ToOwned;
64 #[stable(feature = "rust1", since = "1.0.0")]
65 #[doc(no_inline)]
66 pub use crate::boxed::Box;
67 #[stable(feature = "rust1", since = "1.0.0")]
68 #[doc(no_inline)]
69 pub use crate::string::{String, ToString};
70 #[stable(feature = "rust1", since = "1.0.0")]
71 #[doc(no_inline)]
72 pub use crate::vec::Vec;