-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Avoid cfg_if
in std::os
#81969
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
Avoid cfg_if
in std::os
#81969
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
Is there an issue open for this? |
Well, apart from the issue linked above, no, but I'll create a new one. rust-lang/rust-analyzer#6038 (comment) explains in more detail what isn't working. |
Opened rust-lang/rust-analyzer#7637 |
library/std/src/os/mod.rs
Outdated
|
||
} | ||
} | ||
#[cfg(any(doc, target_os = "linux", target_os = "l4re"))] |
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.
Just want to note that this is technically a behavior change -- previously doc and l4re didn't result in a linux module I think -- but that seems fine to me.
@bors r+ |
📌 Commit 4bf910b has been approved by |
Failed in rollup: #82355 (comment) |
@bors rollup=iffy |
@bors r=Mark-Simulacrum |
📌 Commit 7bc5016 has been approved by |
rust-analyzer cannot currently load the
cfg_if
crate, which means that rust-analyzer is unable to seestd::os::{unix, windows, linux}
here. This works around that by avoidingcfg_if
; the#[cfg]
expressions are simple enough to reasonably write by hand.Fixes rust-lang/rust-analyzer#6038