Skip to content

Conversation

@Enselic
Copy link
Member

@Enselic Enselic commented Nov 3, 2025

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", the pal.rs check() used to erroneously ignore all paths.

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.
@rustbot rustbot added A-tidy Area: The tidy tool S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Nov 3, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 3, 2025

r? @clubby789

rustbot has assigned @clubby789.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@clubby789
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Nov 3, 2025

📌 Commit 97e69d1 has been approved by clubby789

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 3, 2025
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
@bors bors merged commit 0bded52 into rust-lang:master Nov 4, 2025
11 checks passed
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.
@rustbot rustbot added this to the 1.93.0 milestone Nov 4, 2025
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)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants