rust
rust copied to clipboard
deduplicate the rest of AST walker functions
After this, we can tidy things up and deduplicate the visitor traits themselves too.
Fixes rust-lang/rust#139825, apparently
r? @oli-obk
The job aarch64-gnu-llvm-19-1 failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
test [crashes] tests/crashes/139596.rs ... ok
test [crashes] tests/crashes/139659.rs ... ok
test [crashes] tests/crashes/139738.rs ... ok
test [crashes] tests/crashes/139815.rs ... ok
2025-06-09T12:12:19.883838Z ERROR compiletest::runtest: fatal error, panic: "crashtest no longer crashes/triggers ICE, hooray! Please give it a meaningful name, add a doc-comment to the start of the test explaining why it exists and move it to tests/ui or wherever you see fit. Adding 'Fixes #<issueNr>' to your PR description ensures that the corresponding ticket is auto-closed upon merge. If you want to see verbose output, set `COMPILETEST_VERBOSE_CRASHES=1`."
test [crashes] tests/crashes/139825.rs ... FAILED
test [crashes] tests/crashes/138361.rs ... ok
test [crashes] tests/crashes/139905.rs ... ok
test [crashes] tests/crashes/140099.rs ... ok
test [crashes] tests/crashes/140011.rs ... ok
---
failures:
---- [crashes] tests/crashes/139825.rs stdout ----
error: crashtest no longer crashes/triggers ICE, hooray! Please give it a meaningful name, add a doc-comment to the start of the test explaining why it exists and move it to tests/ui or wherever you see fit. Adding 'Fixes #<issueNr>' to your PR description ensures that the corresponding ticket is auto-closed upon merge. If you want to see verbose output, set `COMPILETEST_VERBOSE_CRASHES=1`.
thread '[crashes] tests/crashes/139825.rs' panicked at src/tools/compiletest/src/runtest/crashes.rs:17:18:
fatal error
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
This PR changes a file inside tests/crashes. If a crash was fixed, please move into the corresponding ui subdir and add 'Fixes #<issueNr>' to the PR description to autoclose the issue upon merge.
The job aarch64-gnu-llvm-19-1 failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
##[group]Building test helpers for aarch64-unknown-linux-gnu
##[endgroup]
[TIMING] core::build_steps::test::TestHelpers { target: aarch64-unknown-linux-gnu } -- 0.087
##[group]Testing stage2 compiletest suite=ui mode=ui (aarch64-unknown-linux-gnu)
error: detected unknown compiletest test directive `https://github.com/rust-lang/rust/issues/139825` in /checkout/tests/ui/check-cfg/hrtb-crash.rs:1
errors encountered during EarlyProps parsing: /checkout/tests/ui/check-cfg/hrtb-crash.rs
thread '<unnamed>' panicked at src/tools/compiletest/src/header.rs:70:13:
errors encountered during EarlyProps parsing
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Build completed unsuccessfully in 0:23:54
Any idea which change fixes the crash?
@bors r+
:pushpin: Commit 9b0ad97287c877c992ff15307adcb20c3583cbfb has been approved by oli-obk
It is now in the queue for this repository.
@fee1-dead This had a negative perf impact (found out in rollup https://github.com/rust-lang/rust/pull/142299).
Pasting https://github.com/rust-lang/rust/pull/142299#issuecomment-2964373988 below:
Finished benchmarking commit (294d66c266c83139d525116a1b1addba75f318a4): comparison URL.
Overall result: ❌ regressions - please read the text below
Instruction count
Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
0.5% | [0.1%, 0.7%] | 9 |
| Regressions ❌ (secondary) |
0.4% | [0.2%, 1.1%] | 36 |
| Improvements ✅ (primary) |
- | - | 0 |
| Improvements ✅ (secondary) |
- | - | 0 |
| All ❌✅ (primary) | 0.5% | [0.1%, 0.7%] | 9 |
Max RSS (memory usage)
Results (secondary 8.3%)
A less reliable metric. May be of interest, but not used to determine the overall result above.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
- | - | 0 |
| Regressions ❌ (secondary) |
8.3% | [8.3%, 8.3%] | 1 |
| Improvements ✅ (primary) |
- | - | 0 |
| Improvements ✅ (secondary) |
- | - | 0 |
| All ❌✅ (primary) | - | - | 0 |
Cycles
This benchmark run did not return any relevant results for this metric.
Binary size
This benchmark run did not return any relevant results for this metric.
Bootstrap: 754.321s -> 755.502s (0.16%) Artifact size: 372.15 MiB -> 372.15 MiB (-0.00%)
perf note: The regression will be fixed in #142398