Rollup merge of #125951 - slanterns:error_in_core_stabilization, r=Amanieu
Stabilize `error_in_core` Closes: https://github.com/rust-lang/rust/issues/103765. `@rustbot` label: +T-libs-api r? libs-api
This commit is contained in:
commit
cbda797b77
@ -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)]
|
||||
|
@ -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 @@ fn cause(&self) -> Option<&dyn Error> {
|
||||
///
|
||||
/// ```rust
|
||||
/// #![feature(error_generic_member_access)]
|
||||
/// #![feature(error_in_core)]
|
||||
/// use core::fmt;
|
||||
/// use core::error::{request_ref, Request};
|
||||
///
|
||||
@ -361,8 +360,7 @@ pub fn sources(&self) -> Source<'_> {
|
||||
/// Get a string value from an error.
|
||||
///
|
||||
/// ```rust
|
||||
/// # #![feature(error_generic_member_access)]
|
||||
/// # #![feature(error_in_core)]
|
||||
/// #![feature(error_generic_member_access)]
|
||||
/// use std::error::Error;
|
||||
/// use core::error::request_value;
|
||||
///
|
||||
@ -385,8 +383,7 @@ pub fn request_value<'a, T>(err: &'a (impl Error + ?Sized)) -> Option<T>
|
||||
/// Get a string reference from an error.
|
||||
///
|
||||
/// ```rust
|
||||
/// # #![feature(error_generic_member_access)]
|
||||
/// # #![feature(error_in_core)]
|
||||
/// #![feature(error_generic_member_access)]
|
||||
/// use core::error::Error;
|
||||
/// use core::error::request_ref;
|
||||
///
|
||||
@ -458,7 +455,6 @@ fn request_by_type_tag<'a, I>(err: &'a (impl Error + ?Sized)) -> Option<I::Reifi
|
||||
///
|
||||
/// ```
|
||||
/// #![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 @@ fn new<'b>(erased: &'b mut (dyn Erased<'a> + 'a)) -> &'b mut Request<'a> {
|
||||
///
|
||||
/// ```rust
|
||||
/// #![feature(error_generic_member_access)]
|
||||
/// #![feature(error_in_core)]
|
||||
///
|
||||
/// use core::error::Request;
|
||||
///
|
||||
@ -564,7 +559,6 @@ pub fn provide_value<T>(&mut self, value: T) -> &mut Self
|
||||
///
|
||||
/// ```rust
|
||||
/// #![feature(error_generic_member_access)]
|
||||
/// #![feature(error_in_core)]
|
||||
///
|
||||
/// use core::error::Request;
|
||||
///
|
||||
@ -600,7 +594,6 @@ pub fn provide_value_with<T>(&mut self, fulfil: impl FnOnce() -> T) -> &mut Self
|
||||
///
|
||||
/// ```rust
|
||||
/// #![feature(error_generic_member_access)]
|
||||
/// #![feature(error_in_core)]
|
||||
///
|
||||
/// use core::error::Request;
|
||||
///
|
||||
@ -633,7 +626,6 @@ pub fn provide_ref<T: ?Sized + 'static>(&mut self, value: &'a T) -> &mut Self {
|
||||
///
|
||||
/// ```rust
|
||||
/// #![feature(error_generic_member_access)]
|
||||
/// #![feature(error_in_core)]
|
||||
///
|
||||
/// use core::error::Request;
|
||||
///
|
||||
@ -700,7 +692,6 @@ fn provide_with<I>(&mut self, fulfil: impl FnOnce() -> I::Reified) -> &mut Self
|
||||
///
|
||||
/// ```rust
|
||||
/// #![feature(error_generic_member_access)]
|
||||
/// #![feature(error_in_core)]
|
||||
///
|
||||
/// use core::error::Request;
|
||||
/// use core::error::request_value;
|
||||
@ -788,7 +779,6 @@ pub fn would_be_satisfied_by_value_of<T>(&self) -> bool
|
||||
///
|
||||
/// ```rust
|
||||
/// #![feature(error_generic_member_access)]
|
||||
/// #![feature(error_in_core)]
|
||||
///
|
||||
/// use core::error::Request;
|
||||
/// use core::error::request_ref;
|
||||
|
@ -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)]
|
||||
|
@ -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)]
|
||||
|
@ -45,8 +45,8 @@ fn std_instead_of_core() {
|
||||
|
||||
let _ = std::env!("PATH");
|
||||
|
||||
// do not lint until `error_in_core` is stable
|
||||
use std::error::Error;
|
||||
use core::error::Error;
|
||||
//~^ ERROR: used import from `std` instead of `core`
|
||||
|
||||
// lint items re-exported from private modules, `core::iter::traits::iterator::Iterator`
|
||||
use core::iter::Iterator;
|
||||
|
@ -45,8 +45,8 @@ fn std_instead_of_core() {
|
||||
|
||||
let _ = std::env!("PATH");
|
||||
|
||||
// do not lint until `error_in_core` is stable
|
||||
use std::error::Error;
|
||||
//~^ ERROR: used import from `std` instead of `core`
|
||||
|
||||
// lint items re-exported from private modules, `core::iter::traits::iterator::Iterator`
|
||||
use std::iter::Iterator;
|
||||
|
@ -49,6 +49,12 @@ error: used import from `std` instead of `core`
|
||||
LL | let cell_absolute = ::std::cell::Cell::new(8u32);
|
||||
| ^^^ help: consider importing the item from `core`: `core`
|
||||
|
||||
error: used import from `std` instead of `core`
|
||||
--> tests/ui/std_instead_of_core.rs:48:9
|
||||
|
|
||||
LL | use std::error::Error;
|
||||
| ^^^ help: consider importing the item from `core`: `core`
|
||||
|
||||
error: used import from `std` instead of `core`
|
||||
--> tests/ui/std_instead_of_core.rs:52:9
|
||||
|
|
||||
@ -79,5 +85,5 @@ LL | use alloc::slice::from_ref;
|
||||
= note: `-D clippy::alloc-instead-of-core` implied by `-D warnings`
|
||||
= help: to override `-D warnings` add `#[allow(clippy::alloc_instead_of_core)]`
|
||||
|
||||
error: aborting due to 12 previous errors
|
||||
error: aborting due to 13 previous errors
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user