25
25
//!
26
26
//! # Prelude contents
27
27
//!
28
- //! The current version of the prelude (version 1) lives in
29
- //! [`std::prelude::v1`], and re-exports the following:
28
+ //! The first version of the prelude is used in Rust 2015 and Rust 2018,
29
+ //! and lives in [`std::prelude::v1`].
30
+ //! [`std::prelude::rust_2015`] and [`std::prelude::rust_2018`] re-export this prelude.
31
+ //! It re-exports the following:
30
32
//!
31
33
//! * <code>[std::marker]::{[Copy], [Send], [Sized], [Sync], [Unpin]}</code>,
32
34
//! marker traits that indicate fundamental properties of types.
58
60
//! * <code>[std::string]::{[String], [ToString]}</code>, heap-allocated strings.
59
61
//! * <code>[std::vec]::[Vec]</code>, a growable, heap-allocated vector.
60
62
//!
63
+ //! The prelude used in Rust 2021, [`std::prelude::rust_2021`], includes all of the above,
64
+ //! and in addition re-exports:
65
+ //!
66
+ //! * <code>[std::convert]::{[TryFrom], [TryInto]}</code>,
67
+ //! * <code>[std::iter]::[FromIterator]</code>.
68
+ //!
61
69
//! [mem::drop]: crate::mem::drop
62
70
//! [std::borrow]: crate::borrow
63
71
//! [std::boxed]: crate::boxed
71
79
//! [std::ops]: crate::ops
72
80
//! [std::option]: crate::option
73
81
//! [`std::prelude::v1`]: v1
82
+ //! [`std::prelude::rust_2015`]: rust_2015
83
+ //! [`std::prelude::rust_2018`]: rust_2018
84
+ //! [`std::prelude::rust_2021`]: rust_2021
74
85
//! [std::result]: crate::result
75
86
//! [std::slice]: crate::slice
76
87
//! [std::string]: crate::string
77
88
//! [std::vec]: mod@crate::vec
89
+ //! [TryFrom]: crate::convert::TryFrom
90
+ //! [TryInto]: crate::convert::TryInto
91
+ //! [FromIterator]: crate::iter::FromIterator
78
92
//! [`to_owned`]: crate::borrow::ToOwned::to_owned
79
93
//! [book-closures]: ../../book/ch13-01-closures.html
80
94
//! [book-dtor]: ../../book/ch15-03-drop.html
@@ -88,33 +102,33 @@ pub mod v1;
88
102
/// The 2015 version of the prelude of The Rust Standard Library.
89
103
///
90
104
/// See the [module-level documentation](self) for more.
91
- #[ unstable ( feature = "prelude_2015" , issue = "85684 " ) ]
105
+ #[ stable ( feature = "prelude_2015" , since = "1.55.0 " ) ]
92
106
pub mod rust_2015 {
93
- #[ unstable ( feature = "prelude_2015" , issue = "85684 " ) ]
107
+ #[ stable ( feature = "prelude_2015" , since = "1.55.0 " ) ]
94
108
#[ doc( no_inline) ]
95
109
pub use super :: v1:: * ;
96
110
}
97
111
98
112
/// The 2018 version of the prelude of The Rust Standard Library.
99
113
///
100
114
/// See the [module-level documentation](self) for more.
101
- #[ unstable ( feature = "prelude_2018" , issue = "85684 " ) ]
115
+ #[ stable ( feature = "prelude_2018" , since = "1.55.0 " ) ]
102
116
pub mod rust_2018 {
103
- #[ unstable ( feature = "prelude_2018" , issue = "85684 " ) ]
117
+ #[ stable ( feature = "prelude_2018" , since = "1.55.0 " ) ]
104
118
#[ doc( no_inline) ]
105
119
pub use super :: v1:: * ;
106
120
}
107
121
108
122
/// The 2021 version of the prelude of The Rust Standard Library.
109
123
///
110
124
/// See the [module-level documentation](self) for more.
111
- #[ unstable ( feature = "prelude_2021" , issue = "85684 " ) ]
125
+ #[ stable ( feature = "prelude_2021" , since = "1.55.0 " ) ]
112
126
pub mod rust_2021 {
113
- #[ unstable ( feature = "prelude_2021" , issue = "85684 " ) ]
127
+ #[ stable ( feature = "prelude_2021" , since = "1.55.0 " ) ]
114
128
#[ doc( no_inline) ]
115
129
pub use super :: v1:: * ;
116
130
117
- #[ unstable ( feature = "prelude_2021" , issue = "85684 " ) ]
131
+ #[ stable ( feature = "prelude_2021" , since = "1.55.0 " ) ]
118
132
#[ doc( no_inline) ]
119
133
pub use core:: prelude:: rust_2021:: * ;
120
134
}
0 commit comments