-
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
Fix tidy
platform-specific code check
#84677
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
@bors r+ rollup=iffy |
📌 Commit 4d90635 has been approved by |
⌛ Testing commit 4d90635 with merge 5511dc9a3f454413981b60846dab03c998c6cf45... |
@bors retry yield (yielding to rollup that failed spuriously ) |
⌛ Testing commit 4d90635 with merge 67a78e1a2b86aa7bddbed579182d22d7c1a89a3d... |
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
☀️ Test successful - checks-actions |
…nTitor Move `available_concurrency` implementation to `sys` This splits out the platform-specific implementation of `available_concurrency` to the corresponding platforms under `sys`. No changes are made to the implementation. Tidy didn't lint against this code being originally added outside of `sys` because of a bug (see rust-lang#84677), this PR also reverts the exclusion that was introduced in that bugfix. Tracking issue of `available_concurrency`: rust-lang#74479
…nTitor Move `available_concurrency` implementation to `sys` This splits out the platform-specific implementation of `available_concurrency` to the corresponding platforms under `sys`. No changes are made to the implementation. Tidy didn't lint against this code being originally added outside of `sys` because of a bug (see rust-lang#84677), this PR also reverts the exclusion that was introduced in that bugfix. Tracking issue of `available_concurrency`: rust-lang#74479
I noticed new platform-specific code was introduced outside of
std::sys
(example), which should have been checked against bytidy
. Apparently there are 2 problems with the current check implementation:I fixed the bug and made excluding tests a bit more robust by instead adding the following rules:
tests
orbenches
are excluded.cfg(...)
containingtest
is excluded.(Tests are excluded because almost all tests have something like
#[cfg(not(target_os = "emscripten"))]
somewhere.)The fixed check found some more cases of platform-specific code; for now I have explicitly excluded them and added a FIXME stating that the platform-specific code must be moved to
sys
.