Skip to content

Commit 394f498

Browse files
authored
Unrolled build for rust-lang#125951
Rollup merge of rust-lang#125951 - slanterns:error_in_core_stabilization, r=Amanieu Stabilize `error_in_core` Closes: rust-lang#103765. `@rustbot` label: +T-libs-api r? libs-api
2 parents 8fb1930 + f275ca0 commit 394f498

File tree

7 files changed

+13
-20
lines changed

7 files changed

+13
-20
lines changed

library/alloc/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@
121121
#![feature(deref_pure_trait)]
122122
#![feature(dispatch_from_dyn)]
123123
#![feature(error_generic_member_access)]
124-
#![feature(error_in_core)]
125124
#![feature(exact_size_is_empty)]
126125
#![feature(extend_one)]
127126
#![feature(fmt_internals)]

library/core/src/error.rs

+3-13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![doc = include_str!("error.md")]
2-
#![unstable(feature = "error_in_core", issue = "103765")]
2+
#![stable(feature = "error_in_core", since = "CURRENT_RUSTC_VERSION")]
33

44
#[cfg(test)]
55
mod tests;
@@ -130,7 +130,6 @@ pub trait Error: Debug + Display {
130130
///
131131
/// ```rust
132132
/// #![feature(error_generic_member_access)]
133-
/// #![feature(error_in_core)]
134133
/// use core::fmt;
135134
/// use core::error::{request_ref, Request};
136135
///
@@ -361,8 +360,7 @@ impl dyn Error {
361360
/// Get a string value from an error.
362361
///
363362
/// ```rust
364-
/// # #![feature(error_generic_member_access)]
365-
/// # #![feature(error_in_core)]
363+
/// #![feature(error_generic_member_access)]
366364
/// use std::error::Error;
367365
/// use core::error::request_value;
368366
///
@@ -385,8 +383,7 @@ where
385383
/// Get a string reference from an error.
386384
///
387385
/// ```rust
388-
/// # #![feature(error_generic_member_access)]
389-
/// # #![feature(error_in_core)]
386+
/// #![feature(error_generic_member_access)]
390387
/// use core::error::Error;
391388
/// use core::error::request_ref;
392389
///
@@ -458,7 +455,6 @@ where
458455
///
459456
/// ```
460457
/// #![feature(error_generic_member_access)]
461-
/// #![feature(error_in_core)]
462458
/// use core::fmt;
463459
/// use core::error::Request;
464460
/// use core::error::request_ref;
@@ -529,7 +525,6 @@ impl<'a> Request<'a> {
529525
///
530526
/// ```rust
531527
/// #![feature(error_generic_member_access)]
532-
/// #![feature(error_in_core)]
533528
///
534529
/// use core::error::Request;
535530
///
@@ -564,7 +559,6 @@ impl<'a> Request<'a> {
564559
///
565560
/// ```rust
566561
/// #![feature(error_generic_member_access)]
567-
/// #![feature(error_in_core)]
568562
///
569563
/// use core::error::Request;
570564
///
@@ -600,7 +594,6 @@ impl<'a> Request<'a> {
600594
///
601595
/// ```rust
602596
/// #![feature(error_generic_member_access)]
603-
/// #![feature(error_in_core)]
604597
///
605598
/// use core::error::Request;
606599
///
@@ -633,7 +626,6 @@ impl<'a> Request<'a> {
633626
///
634627
/// ```rust
635628
/// #![feature(error_generic_member_access)]
636-
/// #![feature(error_in_core)]
637629
///
638630
/// use core::error::Request;
639631
///
@@ -700,7 +692,6 @@ impl<'a> Request<'a> {
700692
///
701693
/// ```rust
702694
/// #![feature(error_generic_member_access)]
703-
/// #![feature(error_in_core)]
704695
///
705696
/// use core::error::Request;
706697
/// use core::error::request_value;
@@ -788,7 +779,6 @@ impl<'a> Request<'a> {
788779
///
789780
/// ```rust
790781
/// #![feature(error_generic_member_access)]
791-
/// #![feature(error_in_core)]
792782
///
793783
/// use core::error::Request;
794784
/// use core::error::request_ref;

library/core/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@
112112
#![feature(const_slice_from_ref)]
113113
#![feature(waker_getters)]
114114
#![feature(error_generic_member_access)]
115-
#![feature(error_in_core)]
116115
#![feature(trait_upcasting)]
117116
#![feature(is_ascii_octdigit)]
118117
#![feature(get_many_mut)]

library/std/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,6 @@
324324
#![feature(core_io_borrowed_buf)]
325325
#![feature(duration_constants)]
326326
#![feature(error_generic_member_access)]
327-
#![feature(error_in_core)]
328327
#![feature(error_iter)]
329328
#![feature(exact_size_is_empty)]
330329
#![feature(exclusive_wrapper)]

src/tools/clippy/tests/ui/std_instead_of_core.fixed

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ fn std_instead_of_core() {
4545

4646
let _ = std::env!("PATH");
4747

48-
// do not lint until `error_in_core` is stable
49-
use std::error::Error;
48+
use core::error::Error;
49+
//~^ ERROR: used import from `std` instead of `core`
5050

5151
// lint items re-exported from private modules, `core::iter::traits::iterator::Iterator`
5252
use core::iter::Iterator;

src/tools/clippy/tests/ui/std_instead_of_core.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ fn std_instead_of_core() {
4545

4646
let _ = std::env!("PATH");
4747

48-
// do not lint until `error_in_core` is stable
4948
use std::error::Error;
49+
//~^ ERROR: used import from `std` instead of `core`
5050

5151
// lint items re-exported from private modules, `core::iter::traits::iterator::Iterator`
5252
use std::iter::Iterator;

src/tools/clippy/tests/ui/std_instead_of_core.stderr

+7-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ error: used import from `std` instead of `core`
4949
LL | let cell_absolute = ::std::cell::Cell::new(8u32);
5050
| ^^^ help: consider importing the item from `core`: `core`
5151

52+
error: used import from `std` instead of `core`
53+
--> tests/ui/std_instead_of_core.rs:48:9
54+
|
55+
LL | use std::error::Error;
56+
| ^^^ help: consider importing the item from `core`: `core`
57+
5258
error: used import from `std` instead of `core`
5359
--> tests/ui/std_instead_of_core.rs:52:9
5460
|
@@ -79,5 +85,5 @@ LL | use alloc::slice::from_ref;
7985
= note: `-D clippy::alloc-instead-of-core` implied by `-D warnings`
8086
= help: to override `-D warnings` add `#[allow(clippy::alloc_instead_of_core)]`
8187

82-
error: aborting due to 12 previous errors
88+
error: aborting due to 13 previous errors
8389

0 commit comments

Comments
 (0)