-
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
Make std::os::fd
public.
#98368
Make std::os::fd
public.
#98368
Conversation
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
@rfcbot merge |
This comment was marked as outdated.
This comment was marked as outdated.
Would it be possible to get a listing of everything that is being proposed to be stabilized at a path inside @rfcbot concern what are the contents |
@dtolnay The contents of the
The platforms this PR adds the In the future, it's possible that fortanix_sgx and/or solid may want to add this module as well, as they also have similar types and traits. |
Is this insta-stable? The other thing I'm confused about here is why things like |
I think the idea is that we already have |
@dtolnay Ah I see thanks, I think that makes sense. @sunfishcode Can we add that guidance to the docs of I do admit though that this feels a little strange to me to be honest. I like the practicality behind this, but I think you still have to gate |
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
Yes, I guess it currently is. Would it be better here to use
I've clarified the comment to explicitly mention both Unix and WASI.
It does already have conditional compilation; the |
Hmmm, I suppose, yes. I was more referring to consumers of this API. The import path doesn't really make it clear (like other import paths do) that conditional compilation is needed. It's just a departure from what we've done, I think. The fact that |
I'm not sure of the underlying mechanism, but basically, if we don't have to do this as insta-stable, then we probably shouldn't. The typical insta-stable things are trait impls, and I believe that's because there just isn't any alternative. |
I've now filed a tracking issue #98699, and updated the PR to use a |
@rfcbot fcp cancel |
@dtolnay proposal cancelled. |
Fixed the WIndows build issue. |
@bors r+ rollup |
…r=joshtriplett Make `std::os::fd` public. `std::os::fd` defines types like `OwnedFd` and `RawFd` and is common between Unix and non-Unix platforms that share a basic file-descriptor concept. Rust currently uses this internally to simplify its own code, but it would be useful for external users in the same way, so make it public. This means that `OwnedFd` etc. will all appear in three places, for example on unix platforms: - `std::os::fd::OwnedFd` - `std::os::unix::io::OwnedFd` - `std::os::unix::prelude::OwnedFd` r? `@joshtriplett`
…r=joshtriplett Make `std::os::fd` public. `std::os::fd` defines types like `OwnedFd` and `RawFd` and is common between Unix and non-Unix platforms that share a basic file-descriptor concept. Rust currently uses this internally to simplify its own code, but it would be useful for external users in the same way, so make it public. This means that `OwnedFd` etc. will all appear in three places, for example on unix platforms: - `std::os::fd::OwnedFd` - `std::os::unix::io::OwnedFd` - `std::os::unix::prelude::OwnedFd` r? ``@joshtriplett``
…r=joshtriplett Make `std::os::fd` public. `std::os::fd` defines types like `OwnedFd` and `RawFd` and is common between Unix and non-Unix platforms that share a basic file-descriptor concept. Rust currently uses this internally to simplify its own code, but it would be useful for external users in the same way, so make it public. This means that `OwnedFd` etc. will all appear in three places, for example on unix platforms: - `std::os::fd::OwnedFd` - `std::os::unix::io::OwnedFd` - `std::os::unix::prelude::OwnedFd` r? ```@joshtriplett```
…r=joshtriplett Make `std::os::fd` public. `std::os::fd` defines types like `OwnedFd` and `RawFd` and is common between Unix and non-Unix platforms that share a basic file-descriptor concept. Rust currently uses this internally to simplify its own code, but it would be useful for external users in the same way, so make it public. This means that `OwnedFd` etc. will all appear in three places, for example on unix platforms: - `std::os::fd::OwnedFd` - `std::os::unix::io::OwnedFd` - `std::os::unix::prelude::OwnedFd` r? ````@joshtriplett````
Rollup of 8 pull requests Successful merges: - rust-lang#98368 (Make `std::os::fd` public.) - rust-lang#102085 (Code refactoring smart_resolve_report_errors) - rust-lang#102351 (Improve E0585 help) - rust-lang#102368 (Add a niche to `Duration`, unix `SystemTime`, and non-apple `Instant`) - rust-lang#102393 (Add regression test for issue 94923) - rust-lang#102399 (Account for use of index-based lifetime names in print of binder) - rust-lang#102416 (remove FIXME, improve documentation) - rust-lang#102433 (env::temp_dir: fix a typo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
As @bjorn3 pointed out [here], I used the wrong stability attribute in rust-lang#98368 when making `std::os::fd` public. I set it to Rust 1.63, which was when io-safety was stabilized, but it should be Rust 1.66, which was when `std::os::fd` was stabilized. [here]: rust-lang#98368 (comment)
…stable-version, r=m-ou-se Fix the stability attributes for `std::os::fd`. As `@bjorn3` pointed out [here], I used the wrong stability attribute in rust-lang#98368 when making `std::os::fd` public. I set it to Rust 1.63, which was when io-safety was stabilized, but it should be Rust 1.66, which was when `std::os::fd` was stabilized. [here]: rust-lang#98368 (comment)
As @bjorn3 pointed out [here], I used the wrong stability attribute in #98368 when making `std::os::fd` public. I set it to Rust 1.63, which was when io-safety was stabilized, but it should be Rust 1.66, which was when `std::os::fd` was stabilized. [here]: rust-lang/rust#98368 (comment)
…rsion, r=m-ou-se Fix the stability attributes for `std::os::fd`. As `@bjorn3` pointed out [here], I used the wrong stability attribute in #98368 when making `std::os::fd` public. I set it to Rust 1.63, which was when io-safety was stabilized, but it should be Rust 1.66, which was when `std::os::fd` was stabilized. [here]: rust-lang/rust#98368 (comment)
std::os::fd
defines types likeOwnedFd
andRawFd
and is commonbetween Unix and non-Unix platforms that share a basic file-descriptor
concept. Rust currently uses this internally to simplify its own code,
but it would be useful for external users in the same way, so make it
public.
This means that
OwnedFd
etc. will all appear in three places, forexample on unix platforms:
std::os::fd::OwnedFd
std::os::unix::io::OwnedFd
std::os::unix::prelude::OwnedFd
r? @joshtriplett