|
| 1 | +// Copyright 2013 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 | + |
| 12 | +//! The 2018 edition of the prelude of The Rust Standard Library. |
| 13 | +//! |
| 14 | +//! See the [module-level documentation](../index.html) for more. |
| 15 | +
|
| 16 | + |
| 17 | +#![unstable(feature = "rust2018_prelude", issue = "51418")] |
| 18 | + |
| 19 | +// Re-exported core operators |
| 20 | +#[unstable(feature = "rust2018_prelude", issue = "51418")] |
| 21 | +#[doc(no_inline)] pub use marker::{Copy, Send, Sized, Sync}; |
| 22 | +#[unstable(feature = "rust2018_prelude", issue = "51418")] |
| 23 | +#[doc(no_inline)] pub use ops::{Drop, Fn, FnMut, FnOnce}; |
| 24 | + |
| 25 | +// Re-exported functions |
| 26 | +#[unstable(feature = "rust2018_prelude", issue = "51418")] |
| 27 | +#[doc(no_inline)] pub use mem::drop; |
| 28 | + |
| 29 | +// Re-exported types and traits |
| 30 | +#[unstable(feature = "rust2018_prelude", issue = "51418")] |
| 31 | +#[doc(no_inline)] pub use clone::Clone; |
| 32 | +#[unstable(feature = "rust2018_prelude", issue = "51418")] |
| 33 | +#[doc(no_inline)] pub use cmp::{PartialEq, PartialOrd, Eq, Ord}; |
| 34 | +#[unstable(feature = "rust2018_prelude", issue = "51418")] |
| 35 | +#[doc(no_inline)] pub use convert::{AsRef, AsMut, Into, From}; |
| 36 | +#[unstable(feature = "rust2018_prelude", issue = "51418")] |
| 37 | +#[doc(no_inline)] pub use default::Default; |
| 38 | +#[unstable(feature = "rust2018_prelude", issue = "51418")] |
| 39 | +#[doc(no_inline)] pub use iter::{Iterator, Extend, IntoIterator}; |
| 40 | +#[unstable(feature = "rust2018_prelude", issue = "51418")] |
| 41 | +#[doc(no_inline)] pub use iter::{DoubleEndedIterator, ExactSizeIterator}; |
| 42 | +#[unstable(feature = "rust2018_prelude", issue = "51418")] |
| 43 | +#[doc(no_inline)] pub use option::Option::{self, Some, None}; |
| 44 | +#[unstable(feature = "rust2018_prelude", issue = "51418")] |
| 45 | +#[doc(no_inline)] pub use result::Result::{self, Ok, Err}; |
| 46 | + |
| 47 | + |
| 48 | +// Contents so far are equivalent to src/libcore/prelude/v1.rs |
| 49 | + |
| 50 | + |
| 51 | +// Re-exported types and traits that involve memory allocation |
| 52 | +#[unstable(feature = "rust2018_prelude", issue = "51418")] |
| 53 | +#[doc(no_inline)] pub use boxed::Box; |
| 54 | +#[unstable(feature = "rust2018_prelude", issue = "51418")] |
| 55 | +#[doc(no_inline)] pub use borrow::ToOwned; |
| 56 | +#[unstable(feature = "rust2018_prelude", issue = "51418")] |
| 57 | +#[doc(no_inline)] pub use slice::SliceConcatExt; |
| 58 | +#[unstable(feature = "rust2018_prelude", issue = "51418")] |
| 59 | +#[doc(no_inline)] pub use string::{String, ToString}; |
| 60 | +#[unstable(feature = "rust2018_prelude", issue = "51418")] |
| 61 | +#[doc(no_inline)] pub use vec::Vec; |
| 62 | + |
| 63 | + |
| 64 | +// Contents so far are equivalent to v1.rs |
| 65 | + |
| 66 | + |
| 67 | +// Not in v1.rs because of breakage: https://github.com/rust-lang/rust/pull/49518 |
| 68 | +#[unstable(feature = "rust2018_prelude", issue = "51418")] |
| 69 | +#[doc(no_inline)] pub use convert::{TryFrom, TryInto}; |
0 commit comments