]> git.proxmox.com Git - rustc.git/blame - src/libcore/prelude/v1.rs
New upstream version 1.27.1+dfsg1
[rustc.git] / src / libcore / prelude / v1.rs
CommitLineData
e9174d1e
SL
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
2c00a5a8 19// Re-exported core operators
92a42be0 20#[stable(feature = "core_prelude", since = "1.4.0")]
c30ab7b3
SL
21#[doc(no_inline)]
22pub use marker::{Copy, Send, Sized, Sync};
92a42be0 23#[stable(feature = "core_prelude", since = "1.4.0")]
c30ab7b3
SL
24#[doc(no_inline)]
25pub use ops::{Drop, Fn, FnMut, FnOnce};
e9174d1e 26
2c00a5a8 27// Re-exported functions
92a42be0 28#[stable(feature = "core_prelude", since = "1.4.0")]
c30ab7b3
SL
29#[doc(no_inline)]
30pub use mem::drop;
e9174d1e 31
2c00a5a8 32// Re-exported types and traits
92a42be0 33#[stable(feature = "core_prelude", since = "1.4.0")]
c30ab7b3
SL
34#[doc(no_inline)]
35pub use clone::Clone;
92a42be0 36#[stable(feature = "core_prelude", since = "1.4.0")]
c30ab7b3
SL
37#[doc(no_inline)]
38pub use cmp::{PartialEq, PartialOrd, Eq, Ord};
92a42be0 39#[stable(feature = "core_prelude", since = "1.4.0")]
c30ab7b3
SL
40#[doc(no_inline)]
41pub use convert::{AsRef, AsMut, Into, From};
92a42be0 42#[stable(feature = "core_prelude", since = "1.4.0")]
c30ab7b3
SL
43#[doc(no_inline)]
44pub use default::Default;
92a42be0 45#[stable(feature = "core_prelude", since = "1.4.0")]
c30ab7b3
SL
46#[doc(no_inline)]
47pub use iter::{Iterator, Extend, IntoIterator};
92a42be0 48#[stable(feature = "core_prelude", since = "1.4.0")]
c30ab7b3
SL
49#[doc(no_inline)]
50pub use iter::{DoubleEndedIterator, ExactSizeIterator};
92a42be0 51#[stable(feature = "core_prelude", since = "1.4.0")]
c30ab7b3
SL
52#[doc(no_inline)]
53pub use option::Option::{self, Some, None};
92a42be0 54#[stable(feature = "core_prelude", since = "1.4.0")]
c30ab7b3
SL
55#[doc(no_inline)]
56pub use result::Result::{self, Ok, Err};
e9174d1e 57
2c00a5a8 58// Re-exported extension traits for primitive types
92a42be0 59#[stable(feature = "core_prelude", since = "1.4.0")]
c30ab7b3 60#[doc(no_inline)]
83c7162d 61#[cfg(stage0)]
c30ab7b3 62pub use slice::SliceExt;
92a42be0 63#[stable(feature = "core_prelude", since = "1.4.0")]
c30ab7b3 64#[doc(no_inline)]
83c7162d 65#[cfg(stage0)]
c30ab7b3 66pub use str::StrExt;