Move Error trait into core by yaahc · Pull Request #99917 · rust-lang/rust (original) (raw)
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation34 Commits1 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
This PR moves the error trait from the standard library into a new unstable error
module within the core library. The goal of this PR is to help unify error reporting across the std and no_std ecosystems, as well as open the door to integrating the error trait into the panic reporting system when reporting panics whose source is an errors (such as via expect
).
This PR is a rewrite of #90328 using new compiler features that have been added to support error in core.
c410-f3r, mati865, Xanewok, Kobzol, Folyd, lilyball, tarcieri, MabezDev, schneems, wusyong, and 26 more reacted with thumbs up emoji thomcc, est31, slanterns, terrarier2111, mati865, ChrisDenton, taiki-e, Xanewok, juntyr, Kobzol, and 52 more reacted with hooray emoji thomcc, est31, slanterns, terrarier2111, mati865, ChrisDenton, taiki-e, juntyr, Kobzol, lilyball, and 38 more reacted with heart emoji thomcc, mati865, Kobzol, lilyball, coolreader18, tarcieri, MabezDev, schneems, evanrichter, GrayJack, and 15 more reacted with rocket emoji
Relevant to the infrastructure team, which will review and decide on the PR/issue.
Relevant to the library team, which will review and decide on the PR/issue.
labels
Hey! It looks like you've submitted a new PR for the library teams!
If this PR contains changes to any rust-lang/rust
public library APIs then please comment with @rustbot label +T-libs-api -T-libs
to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.
Examples of T-libs-api
changes:
- Stabilizing library features
- Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
- Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
- Changing public documentation in ways that create new stability guarantees
- Changing observable runtime behavior of library APIs
r? @thomcc
(rust-highfive has picked a reviewer for you, use r? to override)
yaahc changed the title
Error in core move Move Error trait into core
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit ada65c2 with merge cc3bc286abf7599e6270f1e3b15ca478d68832e7...
☀️ Try build successful - checks-actions
Build commit: cc3bc286abf7599e6270f1e3b15ca478d68832e7 (cc3bc286abf7599e6270f1e3b15ca478d68832e7
)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great and is super exciting to see. It seems the bulk of it is from other impls (which will be trimmed down once cfg(bootstrap) cleans up, so I don't really have any comments.
Sorry for the delay in reviewing it, it was fairly large!
Sorry for the delay in reviewing it, it was fairly large!
Entirely understandable, and thank you for slogging through it with me!
This comment has been minimized.
📌 Commit 03861e5 has been approved by thomcc
It is now in the queue for this repository.
bors added S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
🎉 Long time coming! Great work Jane.
Looking forward for core::io::Write
.
@yaahc Is there a tracking issue for this? I don't see any linked and there's not one in the error_in_core
doc annotation.
This was referenced
Oct 30, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request
facebook-github-bot pushed a commit to facebook/SPARTA that referenced this pull request
Summary:
Added fbcode
symlinks for platform010
& platform010-aarch64
and addressed the following fixes:
- Account for stabilized
#![feature(backtrace)]
and#![feature(generic_associated_types)]
- Account for removal of
#![feature(result_into_ok_or_err)]
- Account for migration of
std::io::ReadBuf
tostd::io::BorrowBuf|BorrowCursor
- Account for
Error
trait move into core - Account for
#[warn(non_camel_case_types)]
- Various function signature, lifetime requirement changes and lint fixes
Reviewed By: zertosh
Differential Revision: D40923615
fbshipit-source-id: f7ac2828d74edeae39aae517172207b0ee998a59
facebook-github-bot pushed a commit to facebook/starlark-rust that referenced this pull request
Summary:
Added fbcode
symlinks for platform010
& platform010-aarch64
and addressed the following fixes:
- Account for stabilized
#![feature(backtrace)]
and#![feature(generic_associated_types)]
- Account for removal of
#![feature(result_into_ok_or_err)]
- Account for migration of
std::io::ReadBuf
tostd::io::BorrowBuf|BorrowCursor
- Account for
Error
trait move into core - Account for
#[warn(non_camel_case_types)]
- Various function signature, lifetime requirement changes and lint fixes
Reviewed By: zertosh
Differential Revision: D40923615
fbshipit-source-id: f7ac2828d74edeae39aae517172207b0ee998a59
facebook-github-bot pushed a commit to facebook/sapling that referenced this pull request
Summary:
Added fbcode
symlinks for platform010
& platform010-aarch64
and addressed the following fixes:
- Account for stabilized
#![feature(backtrace)]
and#![feature(generic_associated_types)]
- Account for removal of
#![feature(result_into_ok_or_err)]
- Account for migration of
std::io::ReadBuf
tostd::io::BorrowBuf|BorrowCursor
- Account for
Error
trait move into core - Account for
#[warn(non_camel_case_types)]
- Various function signature, lifetime requirement changes and lint fixes
Reviewed By: zertosh
Differential Revision: D40923615
fbshipit-source-id: f7ac2828d74edeae39aae517172207b0ee998a59
facebook-github-bot pushed a commit to facebookincubator/below that referenced this pull request
Summary:
Added fbcode
symlinks for platform010
& platform010-aarch64
and addressed the following fixes:
- Account for stabilized
#![feature(backtrace)]
and#![feature(generic_associated_types)]
- Account for removal of
#![feature(result_into_ok_or_err)]
- Account for migration of
std::io::ReadBuf
tostd::io::BorrowBuf|BorrowCursor
- Account for
Error
trait move into core - Account for
#[warn(non_camel_case_types)]
- Various function signature, lifetime requirement changes and lint fixes
Reviewed By: zertosh
Differential Revision: D40923615
fbshipit-source-id: f7ac2828d74edeae39aae517172207b0ee998a59
facebook-github-bot pushed a commit to facebookexperimental/rust-shed that referenced this pull request
Summary:
Added fbcode
symlinks for platform010
& platform010-aarch64
and addressed the following fixes:
- Account for stabilized
#![feature(backtrace)]
and#![feature(generic_associated_types)]
- Account for removal of
#![feature(result_into_ok_or_err)]
- Account for migration of
std::io::ReadBuf
tostd::io::BorrowBuf|BorrowCursor
- Account for
Error
trait move into core - Account for
#[warn(non_camel_case_types)]
- Various function signature, lifetime requirement changes and lint fixes
Reviewed By: zertosh
Differential Revision: D40923615
fbshipit-source-id: f7ac2828d74edeae39aae517172207b0ee998a59
facebook-github-bot pushed a commit to facebook/redex that referenced this pull request
Summary:
Added fbcode
symlinks for platform010
& platform010-aarch64
and addressed the following fixes:
- Account for stabilized
#![feature(backtrace)]
and#![feature(generic_associated_types)]
- Account for removal of
#![feature(result_into_ok_or_err)]
- Account for migration of
std::io::ReadBuf
tostd::io::BorrowBuf|BorrowCursor
- Account for
Error
trait move into core - Account for
#[warn(non_camel_case_types)]
- Various function signature, lifetime requirement changes and lint fixes
Reviewed By: zertosh
Differential Revision: D40923615
fbshipit-source-id: f7ac2828d74edeae39aae517172207b0ee998a59
facebook-github-bot pushed a commit to facebookexperimental/reverie that referenced this pull request
Summary:
Added fbcode
symlinks for platform010
& platform010-aarch64
and addressed the following fixes:
- Account for stabilized
#![feature(backtrace)]
and#![feature(generic_associated_types)]
- Account for removal of
#![feature(result_into_ok_or_err)]
- Account for migration of
std::io::ReadBuf
tostd::io::BorrowBuf|BorrowCursor
- Account for
Error
trait move into core - Account for
#[warn(non_camel_case_types)]
- Various function signature, lifetime requirement changes and lint fixes
Reviewed By: zertosh
Differential Revision: D40923615
fbshipit-source-id: f7ac2828d74edeae39aae517172207b0ee998a59
facebook-github-bot pushed a commit to facebookincubator/gazebo_lint that referenced this pull request
Summary:
Added fbcode
symlinks for platform010
& platform010-aarch64
and addressed the following fixes:
- Account for stabilized
#![feature(backtrace)]
and#![feature(generic_associated_types)]
- Account for removal of
#![feature(result_into_ok_or_err)]
- Account for migration of
std::io::ReadBuf
tostd::io::BorrowBuf|BorrowCursor
- Account for
Error
trait move into core - Account for
#[warn(non_camel_case_types)]
- Various function signature, lifetime requirement changes and lint fixes
Reviewed By: zertosh
Differential Revision: D40923615
fbshipit-source-id: f7ac2828d74edeae39aae517172207b0ee998a59
facebook-github-bot pushed a commit to facebook/buck2 that referenced this pull request
Summary:
Added fbcode
symlinks for platform010
& platform010-aarch64
and addressed the following fixes:
- Account for stabilized
#![feature(backtrace)]
and#![feature(generic_associated_types)]
- Account for removal of
#![feature(result_into_ok_or_err)]
- Account for migration of
std::io::ReadBuf
tostd::io::BorrowBuf|BorrowCursor
- Account for
Error
trait move into core - Account for
#[warn(non_camel_case_types)]
- Various function signature, lifetime requirement changes and lint fixes
Reviewed By: zertosh
Differential Revision: D40923615
fbshipit-source-id: f7ac2828d74edeae39aae517172207b0ee998a59
facebook-github-bot pushed a commit to facebook/redex that referenced this pull request
Summary:
Added fbcode
symlinks for platform010
& platform010-aarch64
and addressed the following fixes:
- Account for stabilized
#![feature(backtrace)]
and#![feature(generic_associated_types)]
- Account for removal of
#![feature(result_into_ok_or_err)]
- Account for migration of
std::io::ReadBuf
tostd::io::BorrowBuf|BorrowCursor
- Account for
Error
trait move into core - Account for
#[warn(non_camel_case_types)]
- Various function signature, lifetime requirement changes and lint fixes
Reviewed By: zertosh
Differential Revision: D40923615
fbshipit-source-id: f7ac2828d74edeae39aae517172207b0ee998a59
vmagro pushed a commit to facebookincubator/antlir that referenced this pull request
Summary:
Added fbcode
symlinks for platform010
& platform010-aarch64
and addressed the following fixes:
- Account for stabilized
#![feature(backtrace)]
and#![feature(generic_associated_types)]
- Account for removal of
#![feature(result_into_ok_or_err)]
- Account for migration of
std::io::ReadBuf
tostd::io::BorrowBuf|BorrowCursor
- Account for
Error
trait move into core - Account for
#[warn(non_camel_case_types)]
- Various function signature, lifetime requirement changes and lint fixes
Test Plan:
cd ~/fbcode
buckify_tp2
./common/rust/tools/scripts/check_all.sh fbcode -- --local-only
Reviewed By: zertosh
Differential Revision: D40923615
fbshipit-source-id: f7ac2828d74edeae39aae517172207b0ee998a59
thomcc pushed a commit to tcdi/postgrestd that referenced this pull request
tbu- added a commit to tbu-/rust that referenced this pull request
tbu- mentioned this pull request
tbu- added a commit to tbu-/rust that referenced this pull request
tbu- added a commit to tbu-/rust that referenced this pull request
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request
…trieb
Fix stability attribute of impl !Error for &str
It was introduced in bf7611d (rust-lang#99917), which was included in Rust 1.65.0.
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request
Rollup merge of rust-lang#129312 - tbu-:pr_str_not_impl_error, r=Noratrieb
Fix stability attribute of impl !Error for &str
It was introduced in bf7611d (rust-lang#99917), which was included in Rust 1.65.0.
Labels
This PR was explicitly merged by bors.
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Relevant to the infrastructure team, which will review and decide on the PR/issue.
Relevant to the library team, which will review and decide on the PR/issue.