-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
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 |
…imulacrum Avoid `cfg_if` in `std::os` rust-analyzer cannot currently load the `cfg_if` crate, which means that rust-analyzer is unable to see `std::os::{unix, windows, linux}` here. This works around that by avoiding `cfg_if`; the `#[cfg]` expressions are simple enough to reasonably write by hand. Fixes rust-lang/rust-analyzer#6038
…imulacrum Avoid `cfg_if` in `std::os` rust-analyzer cannot currently load the `cfg_if` crate, which means that rust-analyzer is unable to see `std::os::{unix, windows, linux}` here. This works around that by avoiding `cfg_if`; the `#[cfg]` expressions are simple enough to reasonably write by hand. Fixes rust-lang/rust-analyzer#6038
Failed in rollup: #82355 (comment) |
@bors rollup=iffy |
@bors r=Mark-Simulacrum |
📌 Commit 7bc5016 has been approved by |
…imulacrum Avoid `cfg_if` in `std::os` rust-analyzer cannot currently load the `cfg_if` crate, which means that rust-analyzer is unable to see `std::os::{unix, windows, linux}` here. This works around that by avoiding `cfg_if`; the `#[cfg]` expressions are simple enough to reasonably write by hand. Fixes rust-lang/rust-analyzer#6038
Rollup of 12 pull requests Successful merges: - rust-lang#79423 (Enable smart punctuation) - rust-lang#81154 (Improve design of `assert_len`) - rust-lang#81235 (Improve suggestion for tuple struct pattern matching errors.) - rust-lang#81769 (Suggest `return`ing tail expressions that match return type) - rust-lang#81837 (Slight perf improvement on char::to_ascii_lowercase) - rust-lang#81969 (Avoid `cfg_if` in `std::os`) - rust-lang#81984 (Make WASI's `hard_link` behavior match other platforms.) - rust-lang#82091 (use PlaceRef abstractions more consistently) - rust-lang#82128 (add diagnostic items for OsString/PathBuf/Owned as well as to_vec on slice) - rust-lang#82166 (add s390x-unknown-linux-musl target) - rust-lang#82234 (Remove query parameters when skipping search results) - rust-lang#82255 (Make `treat_err_as_bug` Option<NonZeroUsize>) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Move all `sys::ext` modules to `os` This PR moves all `sys::ext` modules to `os`, centralizing the location of all `os` code and simplifying the dependencies between `os` and `sys`. Because this also removes all uses `cfg_if!` on publicly exported items, where after rust-lang#81969 there were still a few left, this should properly work around rust-lang/rust-analyzer#6038. `@rustbot` label: +T-libs-impl
Move all `sys::ext` modules to `os` This PR moves all `sys::ext` modules to `os`, centralizing the location of all `os` code and simplifying the dependencies between `os` and `sys`. Because this also removes all uses `cfg_if!` on publicly exported items, where after rust-lang#81969 there were still a few left, this should properly work around rust-lang/rust-analyzer#6038. `@rustbot` label: +T-libs-impl
Move all `sys::ext` modules to `os` This PR moves all `sys::ext` modules to `os`, centralizing the location of all `os` code and simplifying the dependencies between `os` and `sys`. Because this also removes all uses `cfg_if!` on publicly exported items, where after rust-lang#81969 there were still a few left, this should properly work around rust-lang/rust-analyzer#6038. `@rustbot` label: +T-libs-impl
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