Skip to content
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 and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new unstable API downcast to std::io::Error #98387

Merged

Conversation

NobodyXu
Copy link
Contributor

that accepts `ErrorData<Box<Custom>>`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
that accepts `ErrorData<Box<Custom>>`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
@rustbot rustbot added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Jun 22, 2022
@rust-highfive
Copy link
Collaborator

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

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @thomcc (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 22, 2022
@NobodyXu
Copy link
Contributor Author

@rustbot label +T-libs-api -T-libs

@rustbot rustbot added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. and removed T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 22, 2022
Copy link
Member

@thomcc thomcc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks okay to me, in terms of the impl (but needs API sign off of course)

library/std/src/io/error.rs Outdated Show resolved Hide resolved
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
@NobodyXu
Copy link
Contributor Author

Emmm, the CI failed at downloading some tools using curl...

@joshtriplett
Copy link
Member

r? @yaahc

@rust-highfive rust-highfive assigned yaahc and unassigned thomcc Jun 23, 2022
@thomcc
Copy link
Member

thomcc commented Jun 23, 2022

@joshtriplett I wrote most of the current io::Error implementation (and I think @yaahc is on vacation), so I'm probably fine as an impl reviewer for this (unless this is part of the new process for API review?).

@rust-log-analyzer

This comment has been minimized.

@joshtriplett
Copy link
Member

@thomcc No problem; I just tend to bring error-related API review to @yaahc's attention.

@NobodyXu
Copy link
Contributor Author

@thomcc Pinging this PR as it has been stale for 17 days.

@yaahc
Copy link
Member

yaahc commented Jul 11, 2022

Reviewing now, thank you for the ping.

edit: left a comment on the ACP issue

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
@rustbot
Copy link
Collaborator

rustbot commented Jul 14, 2022

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

Copy link
Member

@yaahc yaahc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should just need a tracking issue then it is good to go IMO. I have only one minor NIT comment that isn't a blocker.

library/std/src/io/error.rs Outdated Show resolved Hide resolved
Co-authored-by: Jane Losare-Lusby <jlusby42@gmail.com>
@NobodyXu NobodyXu changed the title Add new unstable API try_downcast_inner to std::io::Error Add new unstable API downcast to std::io::Error Jul 15, 2022
@NobodyXu
Copy link
Contributor Author

Should just need a tracking issue then it is good to go IMO. I have only one minor NIT comment that isn't a blocker.

I've added the tracking issue in #99262

library/std/src/io/error.rs Outdated Show resolved Hide resolved
@yaahc
Copy link
Member

yaahc commented Jul 15, 2022

looks great, thank you again!

@bors r+

@bors
Copy link
Contributor

bors commented Jul 15, 2022

📌 Commit 8e8a3be has been approved by yaahc

It is now in the queue for this repository.

@bors 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 Jul 15, 2022
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Jul 16, 2022
…owngrade_inner, r=yaahc

Add new unstable API `downcast` to `std::io::Error`

rust-lang/libs-team#57

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 16, 2022
Rollup of 7 pull requests

Successful merges:

 - rust-lang#98387 (Add new unstable API `downcast` to `std::io::Error`)
 - rust-lang#98662 (Add std::fs::write documentation precision)
 - rust-lang#99253 (Remove FIXME from MIR `always_storage_live_locals`)
 - rust-lang#99264 (Fix typo in mod.rs)
 - rust-lang#99270 (Add `#[must_use]` to `Box::from_raw`)
 - rust-lang#99277 (Stabilize `core::ffi::CStr`, `alloc::ffi::CString`, and friends)
 - rust-lang#99307 (Add regression test for rust-lang#64401)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit bf9ed99 into rust-lang:master Jul 16, 2022
@rustbot rustbot added this to the 1.64.0 milestone Jul 16, 2022
@NobodyXu NobodyXu deleted the feature/std_io_Error_try_downgrade_inner branch July 17, 2022 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants