rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
98.88k stars 12.78k forks source link

std: expose `const_io_error!` as `const_error!` #133449

Open joboet opened 23 hours ago

joboet commented 23 hours ago

ACP: https://github.com/rust-lang/libs-team/issues/205 Tracking issue: https://github.com/rust-lang/rust/issues/133448

Probably best reviewed commit-by-commit, the first one does the API change, the second does the mass-rename.

rustbot commented 23 hours ago

r? @tgross35

rustbot has assigned @tgross35. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

rust-log-analyzer commented 22 hours ago

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot) ```plain ```
rust-log-analyzer commented 22 hours ago

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot) ```plain ---- std/src/io/error.rs - io::error::const_error (line 169) stdout ---- error[E0658]: use of unstable library feature 'hint_must_use' --> std/src/io/error.rs:173:21 | 7 | const FAIL: Error = const_error!(ErrorKind::Unsupported, "tried something that never works"); | = note: see issue #94745 for more information = help: add `#![feature(hint_must_use)]` to the crate attributes to enable = note: this compiler was built on 2024-10-14; consider upgrading it if it is out of date = note: this compiler was built on 2024-10-14; consider upgrading it if it is out of date = note: this error originates in the macro `const_error` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: use of unstable library feature 'io_const_error_internals' --> std/src/io/error.rs:173:21 | 7 | const FAIL: Error = const_error!(ErrorKind::Unsupported, "tried something that never works"); | = help: add `#![feature(io_const_error_internals)]` to the crate attributes to enable = note: this compiler was built on 2024-10-14; consider upgrading it if it is out of date = note: this error originates in the macro `const_error` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `const_error` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: use of unstable library feature 'io_const_error_internals' --> std/src/io/error.rs:173:21 | 7 | const FAIL: Error = const_error!(ErrorKind::Unsupported, "tried something that never works"); | = help: add `#![feature(io_const_error_internals)]` to the crate attributes to enable = note: this compiler was built on 2024-10-14; consider upgrading it if it is out of date = note: this error originates in the macro `const_error` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `const_error` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: use of unstable library feature 'io_const_error_internals' --> std/src/io/error.rs:173:21 | 7 | const FAIL: Error = const_error!(ErrorKind::Unsupported, "tried something that never works"); | = help: add `#![feature(io_const_error_internals)]` to the crate attributes to enable = note: this compiler was built on 2024-10-14; consider upgrading it if it is out of date = note: this error originates in the macro `const_error` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `const_error` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: use of unstable library feature 'io_const_error_internals' --> std/src/io/error.rs:173:21 | 7 | const FAIL: Error = const_error!(ErrorKind::Unsupported, "tried something that never works"); | = help: add `#![feature(io_const_error_internals)]` to the crate attributes to enable = note: this compiler was built on 2024-10-14; consider upgrading it if it is out of date = note: this error originates in the macro `const_error` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `const_error` (in Nightly builds, run with -Z macro-backtrace for more info) error: `must_use` is not yet stable as a const fn --> std/src/io/error.rs:173:21 | 7 | const FAIL: Error = const_error!(ErrorKind::Unsupported, "tried something that never works"); | = help: add `#![feature(hint_must_use)]` to the crate attributes to enable = note: this error originates in the macro `const_error` (in Nightly builds, run with -Z macro-backtrace for more info) --- std/src/io/error.rs - io::error::const_error (line 169) test result: FAILED. 1296 passed; 1 failed; 19 ignored; 0 measured; 0 filtered out; finished in 43.62s error: doctest failed, to rerun pass `-p std --doc` local time: Mon Nov 25 13:37:48 UTC 2024 network time: Mon, 25 Nov 2024 13:37:48 GMT ##[error]Process completed with exit code 1. Post job cleanup. ```
tgross35 commented 16 hours ago

@bors r+

bors commented 16 hours ago

:pushpin: Commit 57d5c6a292e05361d928fd60d54b2478fd0c4e3a has been approved by tgross35

It is now in the queue for this repository.