-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Tracking Issue for io::Error::other
#91946
Comments
I'm not aware of any blockers on this one, and I know it'd be useful in real code. @rust-lang/libs-api, shall we stabilize @rfcbot merge |
Team member @joshtriplett has proposed to merge this. The next step is review by the rest of the tagged team members: Concerns:
Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
Unchecking my box, because I just realized this takes an |
@rfcbot concern into-box |
Hm, one of the most common use cases for this is |
@joshtriplett |
I don't think that necessarily means we should copy the existing API, we have a history of breaking patterns that we consider to have been mistakes, such as While the ship has certainly sailed for @joshtriplett do you have any specific ideas in mind for how we could store errors more efficiently here? cc @thomcc since I think you're the person who has most recently worked on the implementation. For my part I don't really see what we can gain here. I know that replacing |
So, yeah we could do some clever stuff in the impl to make it faster for I would be happy to implement this if we decided to go this route, but I don't think this is worth the hassle, honestly. We'd still have std::io::Error::into_inner, FWIW. So getting your data out on the other side requires boxing anyway (although we'd be able to use it for get_ref and such). Overall, I do not feel strongly, but my vote would be to stick with |
The problem is that such an api taking a string literal will be relatively inefficient, because we cannot specialize on the I believe this is exactly what @joshtriplett wanted to avoid with his proposal: to make sure it's only used for There's no space inside an |
I do think it's perfectly fine to support a string or similar; that's not my concern here at all. I wanted to raise the question, before we commit to this API, of whether this API makes it harder for us to optimize I don't feel strongly about this. If folks feel either that this doesn't preclude such future optimizations or that other aspects of @rfcbot resolved into-box |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon. |
Stabilize `io_error_other` feature Per the FCP for rust-lang#91946.
Stabilize `io_error_other` feature Per the FCP for rust-lang/rust#91946.
This PR replaces the use of unsable feature rust-lang/rust#91946 with its corresponding stable branch equivalent that is slightly more verbose.
This PR replaces the use of unsable feature rust-lang/rust#91946 with its corresponding stable branch equivalent that is slightly more verbose.
This PR replaces the use of unsable feature rust-lang/rust#91946 with its corresponding stable branch equivalent that is slightly more verbose.
@ibraheemdev should this issue be closed as #115453 was merged |
This commit auto-upgrades all dependencies except for `built` which fails in v0.7.4 with error [1]. [1] error[E0658]: use of unstable library feature 'io_error_other' --> /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/built-0.7.4/src/dependencies.rs:24:16 | 24 | .ok_or(io::Error::other("Cargo.lock not found")) | ^^^^^^^^^^^^^^^^ | = note: see issue #91946 <rust-lang/rust#91946> for more information
Note that `built` is kept on `0.7.2` and not latest `0.7.4` because of error [1]. [1] error[E0658]: use of unstable library feature 'io_error_other' --> /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/built-0.7.3/src/dependencies.rs:24:16 | 24 | .ok_or(io::Error::other("Cargo.lock not found")) | ^^^^^^^^^^^^^^^^ | = note: see issue #91946 <rust-lang/rust#91946> for more information
Feature gate:
#![feature(io_error_other)]
This is a tracking issue for
io::Error::other(err)
, a shortcut forio::Error::new(io::ErrorKind::Other, err)
Public API
Steps / History
io::Error::other
#91947io_error_other
feature #115453Unresolved Questions
The text was updated successfully, but these errors were encountered: