Fix tidy platform-specific code check#84677
Merged
bors merged 1 commit intorust-lang:masterfrom May 10, 2021
Merged
Conversation
Contributor
|
(rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
Member
|
@bors r+ rollup=iffy |
Collaborator
|
📌 Commit 4d90635 has been approved by |
Collaborator
|
⌛ Testing commit 4d90635 with merge 5511dc9a3f454413981b60846dab03c998c6cf45... |
|
@bors retry yield (yielding to rollup that failed spuriously ) |
Collaborator
Collaborator
|
⌛ Testing commit 4d90635 with merge 67a78e1a2b86aa7bddbed579182d22d7c1a89a3d... |
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Collaborator
|
💔 Test failed - checks-actions |
Member
Collaborator
Collaborator
|
☀️ Test successful - checks-actions |
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this pull request
Jun 21, 2021
…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
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this pull request
Jun 21, 2021
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
testsorbenchesare excluded.cfg(...)containingtestis 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.