]> git.lizzy.rs Git - rust.git/blob - src/libcore/prelude/v1.rs
rustc_span: return an impl Iterator instead of a Vec from macro_backtrace.
[rust.git] / src / libcore / prelude / v1.rs
1 //! The core prelude
2 //!
3 //! This module is intended for users of libcore which do not link to libstd as
4 //! well. This module is imported by default when `#![no_std]` is used in the
5 //! same manner as the standard library's prelude.
6
7 #![stable(feature = "core_prelude", since = "1.4.0")]
8
9 // Re-exported core operators
10 #[stable(feature = "core_prelude", since = "1.4.0")]
11 #[doc(no_inline)]
12 pub use crate::marker::{Copy, Send, Sized, Sync, Unpin};
13 #[stable(feature = "core_prelude", since = "1.4.0")]
14 #[doc(no_inline)]
15 pub use crate::ops::{Drop, Fn, FnMut, FnOnce};
16
17 // Re-exported functions
18 #[stable(feature = "core_prelude", since = "1.4.0")]
19 #[doc(no_inline)]
20 pub use crate::mem::drop;
21
22 // Re-exported types and traits
23 #[stable(feature = "core_prelude", since = "1.4.0")]
24 #[doc(no_inline)]
25 pub use crate::clone::Clone;
26 #[stable(feature = "core_prelude", since = "1.4.0")]
27 #[doc(no_inline)]
28 pub use crate::cmp::{Eq, Ord, PartialEq, PartialOrd};
29 #[stable(feature = "core_prelude", since = "1.4.0")]
30 #[doc(no_inline)]
31 pub use crate::convert::{AsMut, AsRef, From, Into};
32 #[stable(feature = "core_prelude", since = "1.4.0")]
33 #[doc(no_inline)]
34 pub use crate::default::Default;
35 #[stable(feature = "core_prelude", since = "1.4.0")]
36 #[doc(no_inline)]
37 pub use crate::iter::{DoubleEndedIterator, ExactSizeIterator};
38 #[stable(feature = "core_prelude", since = "1.4.0")]
39 #[doc(no_inline)]
40 pub use crate::iter::{Extend, IntoIterator, Iterator};
41 #[stable(feature = "core_prelude", since = "1.4.0")]
42 #[doc(no_inline)]
43 pub use crate::option::Option::{self, None, Some};
44 #[stable(feature = "core_prelude", since = "1.4.0")]
45 #[doc(no_inline)]
46 pub use crate::result::Result::{self, Err, Ok};
47
48 // Re-exported built-in macros
49 #[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
50 #[doc(no_inline)]
51 pub use crate::fmt::macros::Debug;
52 #[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
53 #[doc(no_inline)]
54 pub use crate::hash::macros::Hash;
55
56 #[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
57 #[doc(no_inline)]
58 pub use crate::{
59     asm, assert, cfg, column, compile_error, concat, concat_idents, env, file, format_args,
60     format_args_nl, global_asm, include, include_bytes, include_str, line, log_syntax, module_path,
61     option_env, stringify, trace_macros,
62 };
63
64 #[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
65 #[allow(deprecated)]
66 #[doc(no_inline)]
67 pub use crate::macros::builtin::{
68     bench, global_allocator, test, test_case, RustcDecodable, RustcEncodable,
69 };