about summary refs log tree commit diff
path: root/library/std/src/prelude
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2023-09-21 00:56:59 +0000
committerDavid Tolnay <dtolnay@gmail.com>2024-03-22 13:30:48 -0700
commitfbf21c5763430d7acdfe9843d8bc7fc2253be334 (patch)
tree015afd122694112f8f25167d3145e5878c0172a3 /library/std/src/prelude
parent2624e9183d8f3587bac325d6f7a9777c36f2f45b (diff)
downloadrust-fbf21c5763430d7acdfe9843d8bc7fc2253be334.tar.gz
rust-fbf21c5763430d7acdfe9843d8bc7fc2253be334.zip
Remove RustcEncodable/Decodable from 2024 prelude
Diffstat (limited to 'library/std/src/prelude')
-rw-r--r--library/std/src/prelude/common.rs (renamed from library/std/src/prelude/v1.rs)14
-rw-r--r--library/std/src/prelude/mod.rs26
2 files changed, 23 insertions, 17 deletions
diff --git a/library/std/src/prelude/v1.rs b/library/std/src/prelude/common.rs
index 0559f34c1b4..f61e04e02b6 100644
--- a/library/std/src/prelude/v1.rs
+++ b/library/std/src/prelude/common.rs
@@ -1,9 +1,7 @@
-//! The first version of the prelude of The Rust Standard Library.
+//! Items common to the prelude of all editions.
 //!
 //! See the [module-level documentation](super) for more.
 
-#![stable(feature = "rust1", since = "1.0.0")]
-
 // Re-exported core operators
 #[stable(feature = "rust1", since = "1.0.0")]
 #[doc(no_inline)]
@@ -52,16 +50,6 @@ pub use core::prelude::v1::{
 #[doc(no_inline)]
 pub use core::prelude::v1::concat_bytes;
 
-// Do not `doc(inline)` these `doc(hidden)` items.
-#[unstable(
-    feature = "rustc_encodable_decodable",
-    issue = "none",
-    soft,
-    reason = "unstable implementation detail of the `rustc` compiler, do not use"
-)]
-#[allow(deprecated)]
-pub use core::prelude::v1::{RustcDecodable, RustcEncodable};
-
 // Do not `doc(no_inline)` so that they become doc items on their own
 // (no public module for them to be re-exported from).
 #[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
diff --git a/library/std/src/prelude/mod.rs b/library/std/src/prelude/mod.rs
index 7d44d2e4b5d..0bdbab716ad 100644
--- a/library/std/src/prelude/mod.rs
+++ b/library/std/src/prelude/mod.rs
@@ -93,7 +93,26 @@
 
 #![stable(feature = "rust1", since = "1.0.0")]
 
-pub mod v1;
+mod common;
+
+/// The first version of the prelude of The Rust Standard Library.
+///
+/// See the [module-level documentation](self) for more.
+#[stable(feature = "rust1", since = "1.0.0")]
+pub mod v1 {
+    #[stable(feature = "rust1", since = "1.0.0")]
+    pub use super::common::*;
+
+    // Do not `doc(inline)` these `doc(hidden)` items.
+    #[unstable(
+        feature = "rustc_encodable_decodable",
+        issue = "none",
+        soft,
+        reason = "derive macro for `rustc-serialize`; should not be used in new code"
+    )]
+    #[allow(deprecated)]
+    pub use core::prelude::v1::{RustcDecodable, RustcEncodable};
+}
 
 /// The 2015 version of the prelude of The Rust Standard Library.
 ///
@@ -134,9 +153,8 @@ pub mod rust_2021 {
 /// See the [module-level documentation](self) for more.
 #[unstable(feature = "prelude_2024", issue = "121042")]
 pub mod rust_2024 {
-    #[unstable(feature = "prelude_2024", issue = "121042")]
-    #[doc(no_inline)]
-    pub use super::v1::*;
+    #[stable(feature = "rust1", since = "1.0.0")]
+    pub use super::common::*;
 
     #[unstable(feature = "prelude_2024", issue = "121042")]
     #[doc(no_inline)]