Auto merge of #85687 - m-ou-se:new-prelude, r=yaahc
New prelude RFC: rust-lang/rfcs#3114 Tracking issue: https://github.com/rust-lang/rust/issues/85684
This commit is contained in:
commit
c4f186f0ea
@ -11,9 +11,9 @@
|
||||
/// The 2015 version of the core prelude.
|
||||
///
|
||||
/// See the [module-level documentation](self) for more.
|
||||
#[unstable(feature = "prelude_2015", issue = "none")]
|
||||
#[unstable(feature = "prelude_2015", issue = "85684")]
|
||||
pub mod rust_2015 {
|
||||
#[unstable(feature = "prelude_2015", issue = "none")]
|
||||
#[unstable(feature = "prelude_2015", issue = "85684")]
|
||||
#[doc(no_inline)]
|
||||
pub use super::v1::*;
|
||||
}
|
||||
@ -21,9 +21,9 @@ pub mod rust_2015 {
|
||||
/// The 2018 version of the core prelude.
|
||||
///
|
||||
/// See the [module-level documentation](self) for more.
|
||||
#[unstable(feature = "prelude_2018", issue = "none")]
|
||||
#[unstable(feature = "prelude_2018", issue = "85684")]
|
||||
pub mod rust_2018 {
|
||||
#[unstable(feature = "prelude_2018", issue = "none")]
|
||||
#[unstable(feature = "prelude_2018", issue = "85684")]
|
||||
#[doc(no_inline)]
|
||||
pub use super::v1::*;
|
||||
}
|
||||
@ -31,11 +31,17 @@ pub mod rust_2018 {
|
||||
/// The 2021 version of the core prelude.
|
||||
///
|
||||
/// See the [module-level documentation](self) for more.
|
||||
#[unstable(feature = "prelude_2021", issue = "none")]
|
||||
#[unstable(feature = "prelude_2021", issue = "85684")]
|
||||
pub mod rust_2021 {
|
||||
#[unstable(feature = "prelude_2021", issue = "none")]
|
||||
#[unstable(feature = "prelude_2021", issue = "85684")]
|
||||
#[doc(no_inline)]
|
||||
pub use super::v1::*;
|
||||
|
||||
// FIXME: Add more things.
|
||||
#[unstable(feature = "prelude_2021", issue = "85684")]
|
||||
#[doc(no_inline)]
|
||||
pub use crate::iter::FromIterator;
|
||||
|
||||
#[unstable(feature = "prelude_2021", issue = "85684")]
|
||||
#[doc(no_inline)]
|
||||
pub use crate::convert::{TryFrom, TryInto};
|
||||
}
|
||||
|
@ -88,9 +88,9 @@
|
||||
/// The 2015 version of the prelude of The Rust Standard Library.
|
||||
///
|
||||
/// See the [module-level documentation](self) for more.
|
||||
#[unstable(feature = "prelude_2015", issue = "none")]
|
||||
#[unstable(feature = "prelude_2015", issue = "85684")]
|
||||
pub mod rust_2015 {
|
||||
#[unstable(feature = "prelude_2015", issue = "none")]
|
||||
#[unstable(feature = "prelude_2015", issue = "85684")]
|
||||
#[doc(no_inline)]
|
||||
pub use super::v1::*;
|
||||
}
|
||||
@ -98,9 +98,9 @@ pub mod rust_2015 {
|
||||
/// The 2018 version of the prelude of The Rust Standard Library.
|
||||
///
|
||||
/// See the [module-level documentation](self) for more.
|
||||
#[unstable(feature = "prelude_2018", issue = "none")]
|
||||
#[unstable(feature = "prelude_2018", issue = "85684")]
|
||||
pub mod rust_2018 {
|
||||
#[unstable(feature = "prelude_2018", issue = "none")]
|
||||
#[unstable(feature = "prelude_2018", issue = "85684")]
|
||||
#[doc(no_inline)]
|
||||
pub use super::v1::*;
|
||||
}
|
||||
@ -108,13 +108,13 @@ pub mod rust_2018 {
|
||||
/// The 2021 version of the prelude of The Rust Standard Library.
|
||||
///
|
||||
/// See the [module-level documentation](self) for more.
|
||||
#[unstable(feature = "prelude_2021", issue = "none")]
|
||||
#[unstable(feature = "prelude_2021", issue = "85684")]
|
||||
pub mod rust_2021 {
|
||||
#[unstable(feature = "prelude_2021", issue = "none")]
|
||||
#[unstable(feature = "prelude_2021", issue = "85684")]
|
||||
#[doc(no_inline)]
|
||||
pub use super::v1::*;
|
||||
|
||||
#[unstable(feature = "prelude_2021", issue = "none")]
|
||||
#[unstable(feature = "prelude_2021", issue = "85684")]
|
||||
#[doc(no_inline)]
|
||||
pub use core::prelude::rust_2021::*;
|
||||
}
|
||||
|
7
src/test/ui/prelude2021.rs
Normal file
7
src/test/ui/prelude2021.rs
Normal file
@ -0,0 +1,7 @@
|
||||
// check-pass
|
||||
// edition:2021
|
||||
// compile-flags: -Zunstable-options
|
||||
|
||||
fn main() {
|
||||
let _: u16 = 123i32.try_into().unwrap();
|
||||
}
|
Loading…
Reference in New Issue
Block a user