]> git.proxmox.com Git - rustc.git/blob - src/libcore/prelude/v1.rs
Imported Upstream version 1.6.0+dfsg1
[rustc.git] / src / libcore / prelude / v1.rs
1 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 //! The core prelude
12 //!
13 //! This module is intended for users of libcore which do not link to libstd as
14 //! well. This module is imported by default when `#![no_std]` is used in the
15 //! same manner as the standard library's prelude.
16
17 #![stable(feature = "core_prelude", since = "1.4.0")]
18
19 // Reexported core operators
20 #[stable(feature = "core_prelude", since = "1.4.0")]
21 #[doc(no_inline)] pub use marker::{Copy, Send, Sized, Sync};
22 #[stable(feature = "core_prelude", since = "1.4.0")]
23 #[doc(no_inline)] pub use ops::{Drop, Fn, FnMut, FnOnce};
24
25 // Reexported functions
26 #[stable(feature = "core_prelude", since = "1.4.0")]
27 #[doc(no_inline)] pub use mem::drop;
28
29 // Reexported types and traits
30 #[stable(feature = "core_prelude", since = "1.4.0")]
31 #[doc(no_inline)] pub use clone::Clone;
32 #[stable(feature = "core_prelude", since = "1.4.0")]
33 #[doc(no_inline)] pub use cmp::{PartialEq, PartialOrd, Eq, Ord};
34 #[stable(feature = "core_prelude", since = "1.4.0")]
35 #[doc(no_inline)] pub use convert::{AsRef, AsMut, Into, From};
36 #[stable(feature = "core_prelude", since = "1.4.0")]
37 #[doc(no_inline)] pub use default::Default;
38 #[stable(feature = "core_prelude", since = "1.4.0")]
39 #[doc(no_inline)] pub use iter::{Iterator, Extend, IntoIterator};
40 #[stable(feature = "core_prelude", since = "1.4.0")]
41 #[doc(no_inline)] pub use iter::{DoubleEndedIterator, ExactSizeIterator};
42 #[stable(feature = "core_prelude", since = "1.4.0")]
43 #[doc(no_inline)] pub use option::Option::{self, Some, None};
44 #[stable(feature = "core_prelude", since = "1.4.0")]
45 #[doc(no_inline)] pub use result::Result::{self, Ok, Err};
46
47 // Reexported extension traits for primitive types
48 #[stable(feature = "core_prelude", since = "1.4.0")]
49 #[doc(no_inline)] pub use slice::SliceExt;
50 #[stable(feature = "core_prelude", since = "1.4.0")]
51 #[doc(no_inline)] pub use str::StrExt;
52 #[stable(feature = "core_prelude", since = "1.4.0")]
53 #[doc(no_inline)] pub use char::CharExt;