1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! libcore prelude
//!
//! 该模块适用于 libcore 的用户,这些用户也未链接到 libstd。
//! 当以与标准库的 prelude 相同的方式使用 `#![no_std]` 时,默认情况下将导入此模块。
//!

#![stable(feature = "core_prelude", since = "1.4.0")]

pub mod v1;

/// 2015 版本的核心 prelude。
///
/// 有关更多信息,请参见 [module-level documentation](self)。
#[stable(feature = "prelude_2015", since = "1.55.0")]
pub mod rust_2015 {
    #[stable(feature = "prelude_2015", since = "1.55.0")]
    #[doc(no_inline)]
    pub use super::v1::*;
}

/// 2018 版本的核心 prelude。
///
/// 有关更多信息,请参见 [module-level documentation](self)。
#[stable(feature = "prelude_2018", since = "1.55.0")]
pub mod rust_2018 {
    #[stable(feature = "prelude_2018", since = "1.55.0")]
    #[doc(no_inline)]
    pub use super::v1::*;
}

/// 2021 版本的核心 prelude。
///
/// 有关更多信息,请参见 [module-level documentation](self)。
#[stable(feature = "prelude_2021", since = "1.55.0")]
pub mod rust_2021 {
    #[stable(feature = "prelude_2021", since = "1.55.0")]
    #[doc(no_inline)]
    pub use super::v1::*;

    #[stable(feature = "prelude_2021", since = "1.55.0")]
    #[doc(no_inline)]
    pub use crate::iter::FromIterator;

    #[stable(feature = "prelude_2021", since = "1.55.0")]
    #[doc(no_inline)]
    pub use crate::convert::{TryFrom, TryInto};
}