-
Notifications
You must be signed in to change notification settings - Fork 13.9k
tidy: Fix false positives with absolute repo paths in pal.rs check()
#148451
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
Merged
+9
−3
Conversation
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
Fixes the bug: 1. git clone https://github.com/rust-lang/rust.git rust-improve-tests 2. cd rust-improve-tests 3. ./x test tidy Expected: No tidy errors found Actual: ``` thread 'pal (library)' (837175) panicked at src/tools/tidy/src/pal.rs:100:5: assertion failed: saw_target_arch ``` Since the git checkout dir contains the word "tests", the `pal.rs` `check()` used to erroneously ignore all paths.
|
r? @clubby789 rustbot has assigned @clubby789. Use |
|
@bors r+ rollup |
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Nov 4, 2025
tidy: Fix false positives with absolute repo paths in `pal.rs` `check()` Fixes this bug: #### Step-by-step 1. `git clone https://github.com/rust-lang/rust.git rust-improve-tests` 2. `cd rust-improve-tests` 3. `./x test tidy` #### Expected No tidy errors found #### Actual ``` thread 'pal (library)' (837175) panicked at src/tools/tidy/src/pal.rs:100:5: assertion failed: saw_target_arch ``` #### Explanation Since the git checkout dir contains the word ["tests"](https://github.com/rust-lang/rust/blob/bf0ce4bc6816e3b9aaa52dc5fd47b8b5b2e0cd50/src/tools/tidy/src/pal.rs#L96), the `pal.rs` `check()` used to erroneously ignore all paths.
bors
added a commit
that referenced
this pull request
Nov 4, 2025
Rollup of 10 pull requests Successful merges: - #133149 (Provide more context on `Fn` closure modifying binding) - #143037 (Make named asm_labels lint not trigger on hexagon register spans) - #144529 (Add `#[rustc_pass_indirectly_in_non_rustic_abis]`) - #145915 (Stabilize `fmt::from_fn`) - #145974 (Stabilize -Zno-jump-tables into -Cjump-tables=bool) - #146057 (feat: add `from_fn_ptr` to `Waker` and `LocalWaker`) - #146301 (library: std: sys: net: uefi: tcp: Implement write_vectored) - #148437 (Regression test for undefined `__chkstk` on `aarch64-unknown-uefi`) - #148448 (Update books) - #148451 (tidy: Fix false positives with absolute repo paths in `pal.rs` `check()`) r? `@ghost` `@rustbot` modify labels: rollup
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Nov 4, 2025
tidy: Fix false positives with absolute repo paths in `pal.rs` `check()` Fixes this bug: #### Step-by-step 1. `git clone https://github.com/rust-lang/rust.git rust-improve-tests` 2. `cd rust-improve-tests` 3. `./x test tidy` #### Expected No tidy errors found #### Actual ``` thread 'pal (library)' (837175) panicked at src/tools/tidy/src/pal.rs:100:5: assertion failed: saw_target_arch ``` #### Explanation Since the git checkout dir contains the word ["tests"](https://github.com/rust-lang/rust/blob/bf0ce4bc6816e3b9aaa52dc5fd47b8b5b2e0cd50/src/tools/tidy/src/pal.rs#L96), the `pal.rs` `check()` used to erroneously ignore all paths.
bors
added a commit
that referenced
this pull request
Nov 4, 2025
Rollup of 9 pull requests Successful merges: - #133149 (Provide more context on `Fn` closure modifying binding) - #144529 (Add `#[rustc_pass_indirectly_in_non_rustic_abis]`) - #145915 (Stabilize `fmt::from_fn`) - #145974 (Stabilize -Zno-jump-tables into -Cjump-tables=bool) - #146057 (feat: add `from_fn_ptr` to `Waker` and `LocalWaker`) - #146301 (library: std: sys: net: uefi: tcp: Implement write_vectored) - #148437 (Regression test for undefined `__chkstk` on `aarch64-unknown-uefi`) - #148448 (Update books) - #148451 (tidy: Fix false positives with absolute repo paths in `pal.rs` `check()`) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
that referenced
this pull request
Nov 4, 2025
Rollup of 8 pull requests Successful merges: - #133149 (Provide more context on `Fn` closure modifying binding) - #145915 (Stabilize `fmt::from_fn`) - #145974 (Stabilize -Zno-jump-tables into -Cjump-tables=bool) - #146057 (feat: add `from_fn_ptr` to `Waker` and `LocalWaker`) - #146301 (library: std: sys: net: uefi: tcp: Implement write_vectored) - #148437 (Regression test for undefined `__chkstk` on `aarch64-unknown-uefi`) - #148448 (Update books) - #148451 (tidy: Fix false positives with absolute repo paths in `pal.rs` `check()`) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
that referenced
this pull request
Nov 4, 2025
Rollup merge of #148451 - Enselic:tidy-fix, r=clubby789 tidy: Fix false positives with absolute repo paths in `pal.rs` `check()` Fixes this bug: #### Step-by-step 1. `git clone https://github.com/rust-lang/rust.git rust-improve-tests` 2. `cd rust-improve-tests` 3. `./x test tidy` #### Expected No tidy errors found #### Actual ``` thread 'pal (library)' (837175) panicked at src/tools/tidy/src/pal.rs:100:5: assertion failed: saw_target_arch ``` #### Explanation Since the git checkout dir contains the word ["tests"](https://github.com/rust-lang/rust/blob/bf0ce4bc6816e3b9aaa52dc5fd47b8b5b2e0cd50/src/tools/tidy/src/pal.rs#L96), the `pal.rs` `check()` used to erroneously ignore all paths.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-tidy
Area: The tidy tool
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
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.
Fixes this bug:
Step-by-step
git clone https://github.com/rust-lang/rust.git rust-improve-testscd rust-improve-tests./x test tidyExpected
No tidy errors found
Actual
Explanation
Since the git checkout dir contains the word "tests", the
pal.rscheck()used to erroneously ignore all paths.