-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Unify OsString/OsStr for byte-based implementations #58953
Conversation
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Why is a stability attribute required now? There wasn't one on the |
This looks great! I wish we could unify the doc comments as well, but even without that, this is a huge improvement. |
I'll take suggestions on how to do that. As you can see, currently you need to |
On Wed, Mar 06, 2019 at 11:19:43AM -0800, jethrogb wrote:
> I wish we could unify the doc comments as well, but even without that, this is a huge improvement.
I'll take suggestions on how to do that. As you can see, currently you need to `use` the respective modules, so they have to be different.
Short of a macro generating `#[doc]` attributes, or making modules like
`ffi_bytes` visible parts of the API, I don't know a good way
to do that. The former seems potentially worth it; the latter I'd prefer
("this module exists only on certain platforms") but requires some
discussion.
Either way, I'd like to see *this* change go in, and we can consider
further changes afterward.
|
Ok cool. Do you have any comments on the stability attribute issue? |
@jethrogb No, I don't know why that happens. I don't know why you'd need separate stability attributes here. @rust-lang/libs? |
If the compiler requires a stability attribute then one needs to be applied. The compiler will often ask for a stability attribute on something that isn't actually used in stability attribute processing, but theoretically can be taken into account one day |
Nevermind, I wasn't reading the error message correctly. Stability attributes are warranted here. Fixed now. |
ping from triage @joshtriplett waiting for your review on this |
@bors r+ |
📌 Commit 3bc4e76befab3e55bce7c29824f5d26b34deabba has been approved by |
src/libstd/sys_common/mod.rs
Outdated
pub mod io; | ||
pub mod mutex; | ||
#[cfg(any(unix, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this #[cfg]
annotation perhaps be removed to simply #![allow(dead_code)]
in the module? It's not really critical we actually delete dead code here and maintaining this #[cfg]
over time seems like it may get burdensome (especially if it's duplicated with the above)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not possible because the code doesn't compile as-is on Windows - see https://travis-ci.com/rust-lang/rust/jobs/186485408
I don't think maintaining the cfg (which I put back) is problematic, lots of sys/
has code like this.
Made requested changes |
@bors: r=JoshTriplett |
📌 Commit fbc1aeda438c402af79e629fbac7f66dccdf9f8c has been approved by |
Force-pushed. This PR needs to be approved again. |
@bors: r+ |
📌 Commit 7b1fc49e5d424765dde8baf4f29d8fddc71abc41 has been approved by |
⌛ Testing commit 7b1fc49e5d424765dde8baf4f29d8fddc71abc41 with merge 987e145a46b12c6cd8dc5fc75817bc02fe95b764... |
💔 Test failed - status-appveyor |
Fixed rustdoc. It's a pretty ugly hack because rustdoc can document code that doesn't otherwise compile. But this is how it used to work, so I'm not too keen on changing that now. |
@bors: r+ |
📌 Commit 2079df1 has been approved by |
Unify OsString/OsStr for byte-based implementations As requested in #57860 r? @joshtriplett
☀️ Test successful - checks-travis, status-appveyor |
As requested in #57860
r? @joshtriplett