From 3f4816887c7752b5c2fb33ece1fd37298f06577f Mon Sep 17 00:00:00 2001 From: Slanterns Date: Tue, 4 Jun 2024 05:26:55 +0800 Subject: [PATCH 1/2] Stabilize `error_in_core` --- alloc/src/lib.rs | 1 - core/src/error.rs | 12 +----------- core/tests/lib.rs | 1 - std/src/lib.rs | 1 - 4 files changed, 1 insertion(+), 14 deletions(-) diff --git a/alloc/src/lib.rs b/alloc/src/lib.rs index 4ac0c9b15be7a..4749b8880fbc4 100644 --- a/alloc/src/lib.rs +++ b/alloc/src/lib.rs @@ -121,7 +121,6 @@ #![feature(deref_pure_trait)] #![feature(dispatch_from_dyn)] #![feature(error_generic_member_access)] -#![feature(error_in_core)] #![feature(exact_size_is_empty)] #![feature(extend_one)] #![feature(fmt_internals)] diff --git a/core/src/error.rs b/core/src/error.rs index a3f2b767054e1..99f10e6d9d104 100644 --- a/core/src/error.rs +++ b/core/src/error.rs @@ -1,5 +1,5 @@ #![doc = include_str!("error.md")] -#![unstable(feature = "error_in_core", issue = "103765")] +#![stable(feature = "error_in_core", since = "CURRENT_RUSTC_VERSION")] #[cfg(test)] mod tests; @@ -130,7 +130,6 @@ pub trait Error: Debug + Display { /// /// ```rust /// #![feature(error_generic_member_access)] - /// #![feature(error_in_core)] /// use core::fmt; /// use core::error::{request_ref, Request}; /// @@ -362,7 +361,6 @@ impl dyn Error { /// /// ```rust /// # #![feature(error_generic_member_access)] -/// # #![feature(error_in_core)] /// use std::error::Error; /// use core::error::request_value; /// @@ -386,7 +384,6 @@ where /// /// ```rust /// # #![feature(error_generic_member_access)] -/// # #![feature(error_in_core)] /// use core::error::Error; /// use core::error::request_ref; /// @@ -458,7 +455,6 @@ where /// /// ``` /// #![feature(error_generic_member_access)] -/// #![feature(error_in_core)] /// use core::fmt; /// use core::error::Request; /// use core::error::request_ref; @@ -529,7 +525,6 @@ impl<'a> Request<'a> { /// /// ```rust /// #![feature(error_generic_member_access)] - /// #![feature(error_in_core)] /// /// use core::error::Request; /// @@ -564,7 +559,6 @@ impl<'a> Request<'a> { /// /// ```rust /// #![feature(error_generic_member_access)] - /// #![feature(error_in_core)] /// /// use core::error::Request; /// @@ -600,7 +594,6 @@ impl<'a> Request<'a> { /// /// ```rust /// #![feature(error_generic_member_access)] - /// #![feature(error_in_core)] /// /// use core::error::Request; /// @@ -633,7 +626,6 @@ impl<'a> Request<'a> { /// /// ```rust /// #![feature(error_generic_member_access)] - /// #![feature(error_in_core)] /// /// use core::error::Request; /// @@ -700,7 +692,6 @@ impl<'a> Request<'a> { /// /// ```rust /// #![feature(error_generic_member_access)] - /// #![feature(error_in_core)] /// /// use core::error::Request; /// use core::error::request_value; @@ -788,7 +779,6 @@ impl<'a> Request<'a> { /// /// ```rust /// #![feature(error_generic_member_access)] - /// #![feature(error_in_core)] /// /// use core::error::Request; /// use core::error::request_ref; diff --git a/core/tests/lib.rs b/core/tests/lib.rs index 20ff6fd7687fe..f632883b563d3 100644 --- a/core/tests/lib.rs +++ b/core/tests/lib.rs @@ -112,7 +112,6 @@ #![feature(const_slice_from_ref)] #![feature(waker_getters)] #![feature(error_generic_member_access)] -#![feature(error_in_core)] #![feature(trait_upcasting)] #![feature(is_ascii_octdigit)] #![feature(get_many_mut)] diff --git a/std/src/lib.rs b/std/src/lib.rs index 9d6576fa84117..1c226f9f08f10 100644 --- a/std/src/lib.rs +++ b/std/src/lib.rs @@ -324,7 +324,6 @@ #![feature(core_io_borrowed_buf)] #![feature(duration_constants)] #![feature(error_generic_member_access)] -#![feature(error_in_core)] #![feature(error_iter)] #![feature(exact_size_is_empty)] #![feature(exclusive_wrapper)] From 7014731c32e05cc36afb8caa76d1fba5859b7b00 Mon Sep 17 00:00:00 2001 From: Slanterns Date: Tue, 4 Jun 2024 05:33:03 +0800 Subject: [PATCH 2/2] fix doc comments about `error_generic_member_access` --- core/src/error.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/error.rs b/core/src/error.rs index 99f10e6d9d104..da18fdc6e1d1f 100644 --- a/core/src/error.rs +++ b/core/src/error.rs @@ -360,7 +360,7 @@ impl dyn Error { /// Get a string value from an error. /// /// ```rust -/// # #![feature(error_generic_member_access)] +/// #![feature(error_generic_member_access)] /// use std::error::Error; /// use core::error::request_value; /// @@ -383,7 +383,7 @@ where /// Get a string reference from an error. /// /// ```rust -/// # #![feature(error_generic_member_access)] +/// #![feature(error_generic_member_access)] /// use core::error::Error; /// use core::error::request_ref; ///