Remove check_mod_loops query and run the checks per-body instead
This analysis is older than my first rustc contribution I believe. It was never querified. Ideally we'd merge it into the analysis happening within typeck anyway (typeck just uses span_delayed_bug instead of erroring), but I didn't want to do that within this PR that also moves things around and subtly changes diagnostic ordering.
r? @nnethercote
rustbot has assigned @nnethercote. 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
@bors try @rust-timer queue
Awaiting bors try build completion.
@rustbot label: +S-waiting-on-perf
@bors2 try @rust-timer queue
:hourglass: Trying commit 12e39f2593ac420b671f697e204abd3db46a57f2 with merge 4969ee0a148ad34e23c92a05358a32e506e9291b...
Awaiting bors try build completion.
@rustbot label: +S-waiting-on-perf
:hourglass: Trying commit 12e39f2593ac420b671f697e204abd3db46a57f2 with merge 70deff44501588bf26b8650f6e7b1b9c354fd45a…
The job mingw-check-tidy failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
info: removing rustup binaries
info: rustup is uninstalled
##[group]Image checksum input
mingw-check-tidy
# We use the ghcr base image because ghcr doesn't have a rate limit
# and the mingw-check-tidy job doesn't cache docker images in CI.
FROM ghcr.io/rust-lang/ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
g++ \
---
COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/
# NOTE: intentionally uses python2 for x.py so we can test it still works.
# validate-toolstate only runs in our CI, so it's ok for it to only support python3.
ENV SCRIPT TIDY_PRINT_DIFF=1 npm install eslint@$(head -n 1 /tmp/eslint.version) && \
python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py,cpp
8.6.0#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --allow-unsafe --generate-hashes reuse-requirements.in
---
#15 2.720 Building wheels for collected packages: reuse
#15 2.721 Building wheel for reuse (pyproject.toml): started
#15 2.934 Building wheel for reuse (pyproject.toml): finished with status 'done'
#15 2.935 Created wheel for reuse: filename=reuse-4.0.3-cp310-cp310-manylinux_2_35_x86_64.whl size=132719 sha256=d2a2565e7037ad3883fb9337653f2e25bbb588534fbef3697286cbc26d1bf634
#15 2.935 Stored in directory: /tmp/pip-ephem-wheel-cache-s2sk8psn/wheels/3d/8d/0a/e0fc6aba4494b28a967ab5eaf951c121d9c677958714e34532
#15 2.937 Successfully built reuse
#15 2.937 Installing collected packages: boolean-py, binaryornot, tomlkit, reuse, python-debian, markupsafe, license-expression, jinja2, chardet, attrs
#15 3.336 Successfully installed attrs-23.2.0 binaryornot-0.4.4 boolean-py-4.0 chardet-5.2.0 jinja2-3.1.4 license-expression-30.3.0 markupsafe-2.1.5 python-debian-0.1.49 reuse-4.0.3 tomlkit-0.13.0
#15 3.337 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#15 3.868 Collecting virtualenv
#15 3.908 Downloading virtualenv-20.31.2-py3-none-any.whl (6.1 MB)
#15 3.988 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.1/6.1 MB 79.2 MB/s eta 0:00:00
#15 4.031 Collecting distlib<1,>=0.3.7
#15 4.036 Downloading distlib-0.3.9-py2.py3-none-any.whl (468 kB)
#15 4.043 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 469.0/469.0 KB 86.9 MB/s eta 0:00:00
#15 4.080 Collecting filelock<4,>=3.12.2
#15 4.084 Downloading filelock-3.18.0-py3-none-any.whl (16 kB)
#15 4.118 Collecting platformdirs<5,>=3.9.1
#15 4.122 Downloading platformdirs-4.3.8-py3-none-any.whl (18 kB)
#15 4.204 Installing collected packages: distlib, platformdirs, filelock, virtualenv
#15 4.398 Successfully installed distlib-0.3.9 filelock-3.18.0 platformdirs-4.3.8 virtualenv-20.31.2
#15 4.399 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#15 DONE 4.5s
#16 [10/11] COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
#16 DONE 0.0s
---
DirectMap4k: 131008 kB
DirectMap2M: 7208960 kB
DirectMap1G: 11534336 kB
##[endgroup]
Executing TIDY_PRINT_DIFF=1 npm install eslint@$(head -n 1 /tmp/eslint.version) && python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py,cpp
+ head -n 1 /tmp/eslint.version
+ TIDY_PRINT_DIFF=1 npm install [email protected]
npm WARN deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated @humanwhocodes/[email protected]: Use @eslint/config-array instead
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated @humanwhocodes/[email protected]: Use @eslint/object-schema instead
npm WARN deprecated [email protected]: This version is no longer supported. Please see https://eslint.org/version-support for other options.
added 89 packages in 2s
17 packages are looking for funding
run `npm fund` for details
+ python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py,cpp
##[group]Building bootstrap
Finished `dev` profile [unoptimized] target(s) in 0.05s
##[endgroup]
WARN: currently no CI rustc builds have rustc debug assertions enabled. Please either set `rust.debug-assertions` to `false` if you want to use download CI rustc or set `rust.download-rustc` to `false`.
downloading https://static.rust-lang.org/dist/2025-05-27/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.xz
---
fmt: checked 6032 files
tidy check
Running eslint on rustdoc JS files
tidy: Skipping binary file check, read-only filesystem
tidy error: /checkout/tests/ui/inline-const/break-inside-inline-const-issue-128604.rs: missing trailing newline
removing old virtual environment
creating virtual environment at '/checkout/obj/build/venv' using 'python3.10' and 'venv'
creating virtual environment at '/checkout/obj/build/venv' using 'python3.10' and 'virtualenv'
Requirement already satisfied: pip in ./build/venv/lib/python3.10/site-packages (25.1.1)
linting python files
All checks passed!
checking python file formatting
26 files already formatted
checking C++ file formatting
some tidy checks failed
Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:01:49
local time: Mon Jun 2 08:34:23 UTC 2025
network time: Mon, 02 Jun 2025 08:34:23 GMT
##[error]Process completed with exit code 1.
Post job cleanup.
:sunny: Try build successful (CI)
Build commit: 70deff44501588bf26b8650f6e7b1b9c354fd45a (70deff44501588bf26b8650f6e7b1b9c354fd45a)
Queued 70deff44501588bf26b8650f6e7b1b9c354fd45a with parent 91fad92585b2dafc52a074e502b2a6c1f093ca35, future comparison URL. There are currently 2 preceding artifacts in the queue. It will probably take at least ~3.5 hours until the benchmark run finishes.
Finished benchmarking commit (70deff44501588bf26b8650f6e7b1b9c354fd45a): comparison URL.
Overall result: ✅ improvements - no action needed
Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.
@bors rollup=never @rustbot label: -S-waiting-on-perf -perf-regression
Instruction count
This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
- | - | 0 |
| Regressions ❌ (secondary) |
0.2% | [0.2%, 0.2%] | 1 |
| Improvements ✅ (primary) |
- | - | 0 |
| Improvements ✅ (secondary) |
-0.6% | [-1.2%, -0.2%] | 14 |
| All ❌✅ (primary) | - | - | 0 |
Max RSS (memory usage)
Results (primary -1.2%, secondary -0.3%)
This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
- | - | 0 |
| Regressions ❌ (secondary) |
1.1% | [0.4%, 3.2%] | 8 |
| Improvements ✅ (primary) |
-1.2% | [-1.2%, -1.2%] | 1 |
| Improvements ✅ (secondary) |
-1.9% | [-6.6%, -0.7%] | 7 |
| All ❌✅ (primary) | -1.2% | [-1.2%, -1.2%] | 1 |
Cycles
Results (secondary -0.3%)
This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
- | - | 0 |
| Regressions ❌ (secondary) |
0.9% | [0.4%, 1.4%] | 7 |
| Improvements ✅ (primary) |
- | - | 0 |
| Improvements ✅ (secondary) |
-1.1% | [-2.8%, -0.4%] | 11 |
| All ❌✅ (primary) | - | - | 0 |
Binary size
This benchmark run did not return any relevant results for this metric.
Bootstrap: 774.333s -> 774.617s (0.04%) Artifact size: 372.28 MiB -> 371.80 MiB (-0.13%)
@bors r+
:pushpin: Commit d71853268d114c7ddca496e2f4b2a64c769164c6 has been approved by nnethercote
It is now in the queue for this repository.
:umbrella: The latest upstream changes (presumably #141774) made this pull request unmergeable. Please resolve the merge conflicts.
@bors r=nnethercote
:pushpin: Commit 7f4093e78bbddae798e3eaf4d713da75c6315877 has been approved by nnethercote
It is now in the queue for this repository.
@bors p=6 move it above the next rollup
:hourglass: Testing commit 7f4093e78bbddae798e3eaf4d713da75c6315877 with merge 1c047506f94cd2d05228eb992b0a6bbed1942349...
:sunny: Test successful - checks-actions Approved by: nnethercote Pushing 1c047506f94cd2d05228eb992b0a6bbed1942349 to master...
What is this?
This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 1677d46cb128cc8f285dbd32b0dc4d7a46437050 (parent) -> 1c047506f94cd2d05228eb992b0a6bbed1942349 (this PR)
Test differences
Show 175 test diffs
Stage 1
errors::verify_hir_typeck_break_inside_closure_20: [missing] -> pass (J0)errors::verify_hir_typeck_break_inside_coroutine_21: [missing] -> pass (J0)errors::verify_hir_typeck_cast_enum_drop_20: pass -> [missing] (J0)errors::verify_hir_typeck_cast_enum_drop_25: [missing] -> pass (J0)errors::verify_hir_typeck_cast_thin_pointer_to_wide_pointer_27: [missing] -> pass (J0)errors::verify_hir_typeck_continue_labeled_block_19: [missing] -> pass (J0)errors::verify_hir_typeck_ctor_is_private_21: pass -> [missing] (J0)errors::verify_hir_typeck_ctor_is_private_26: [missing] -> pass (J0)errors::verify_hir_typeck_fn_item_to_variadic_function_29: [missing] -> pass (J0)errors::verify_hir_typeck_naked_asm_outside_naked_fn_26: pass -> [missing] (J0)errors::verify_hir_typeck_naked_asm_outside_naked_fn_31: [missing] -> pass (J0)errors::verify_hir_typeck_naked_functions_must_naked_asm_29: pass -> [missing] (J0)errors::verify_hir_typeck_no_associated_item_19: pass -> [missing] (J0)errors::verify_hir_typeck_no_patterns_27: pass -> [missing] (J0)errors::verify_hir_typeck_no_patterns_32: [missing] -> pass (J0)errors::verify_hir_typeck_params_not_allowed_28: pass -> [missing] (J0)errors::verify_hir_typeck_params_not_allowed_33: [missing] -> pass (J0)errors::verify_hir_typeck_pass_to_variadic_function_23: pass -> [missing] (J0)errors::verify_hir_typeck_pass_to_variadic_function_28: [missing] -> pass (J0)errors::verify_hir_typeck_register_type_unstable_25: pass -> [missing] (J0)errors::verify_hir_typeck_register_type_unstable_30: [missing] -> pass (J0)errors::verify_hir_typeck_unlabeled_cf_in_while_condition_23: [missing] -> pass (J0)errors::verify_hir_typeck_unlabeled_in_labeled_block_22: [missing] -> pass (J0)errors::verify_passes_attr_application_enum_137: [missing] -> pass (J0)errors::verify_passes_attr_application_enum_142: pass -> [missing] (J0)errors::verify_passes_attr_application_struct_138: [missing] -> pass (J0)errors::verify_passes_attr_application_struct_143: pass -> [missing] (J0)errors::verify_passes_attr_application_struct_enum_function_method_union_146: pass -> [missing] (J0)errors::verify_passes_attr_application_struct_enum_union_140: [missing] -> pass (J0)errors::verify_passes_attr_application_struct_enum_union_145: pass -> [missing] (J0)errors::verify_passes_attr_application_struct_union_144: pass -> [missing] (J0)errors::verify_passes_attr_only_in_functions_128: [missing] -> pass (J0)errors::verify_passes_attr_only_in_functions_133: pass -> [missing] (J0)errors::verify_passes_break_inside_closure_128: pass -> [missing] (J0)errors::verify_passes_break_inside_coroutine_129: pass -> [missing] (J0)errors::verify_passes_cannot_stabilize_deprecated_145: [missing] -> pass (J0)errors::verify_passes_cannot_stabilize_deprecated_150: pass -> [missing] (J0)errors::verify_passes_const_stable_not_stable_154: [missing] -> pass (J0)errors::verify_passes_const_stable_not_stable_159: pass -> [missing] (J0)errors::verify_passes_continue_labeled_block_127: pass -> [missing] (J0)errors::verify_passes_deprecated_attribute_143: [missing] -> pass (J0)errors::verify_passes_deprecated_attribute_148: pass -> [missing] (J0)errors::verify_passes_duplicate_feature_err_152: [missing] -> pass (J0)errors::verify_passes_duplicate_feature_err_157: pass -> [missing] (J0)errors::verify_passes_extern_main_135: pass -> [missing] (J0)errors::verify_passes_implied_feature_not_exist_151: [missing] -> pass (J0)errors::verify_passes_implied_feature_not_exist_156: pass -> [missing] (J0)errors::verify_passes_incorrect_crate_type_132: [missing] -> pass (J0)errors::verify_passes_incorrect_crate_type_137: pass -> [missing] (J0)errors::verify_passes_incorrect_target_131: [missing] -> pass (J0)errors::verify_passes_ineffective_unstable_impl_167: pass -> [missing] (J0)errors::verify_passes_inline_ignored_for_exported_140: pass -> [missing] (J0)errors::verify_passes_missing_const_err_153: [missing] -> pass (J0)errors::verify_passes_missing_const_err_158: pass -> [missing] (J0)errors::verify_passes_missing_const_stab_attr_148: [missing] -> pass (J0)errors::verify_passes_missing_const_stab_attr_153: pass -> [missing] (J0)errors::verify_passes_missing_stability_attr_147: [missing] -> pass (J0)errors::verify_passes_missing_stability_attr_152: pass -> [missing] (J0)errors::verify_passes_multiple_rustc_main_129: [missing] -> pass (J0)errors::verify_passes_naked_functions_incompatible_attribute_127: [missing] -> pass (J0)errors::verify_passes_no_sanitize_164: [missing] -> pass (J0)errors::verify_passes_no_sanitize_169: pass -> [missing] (J0)errors::verify_passes_object_lifetime_err_136: [missing] -> pass (J0)errors::verify_passes_object_lifetime_err_141: pass -> [missing] (J0)errors::verify_passes_only_has_effect_on_134: [missing] -> pass (J0)errors::verify_passes_only_has_effect_on_139: pass -> [missing] (J0)errors::verify_passes_rustc_const_stable_indirect_pairing_170: pass -> [missing] (J0)errors::verify_passes_trait_impl_const_stable_149: [missing] -> pass (J0)errors::verify_passes_trait_impl_const_stable_154: pass -> [missing] (J0)errors::verify_passes_transparent_incompatible_147: pass -> [missing] (J0)errors::verify_passes_unexportable_adt_with_private_fields_173: [missing] -> pass (J0)errors::verify_passes_unexportable_adt_with_private_fields_178: pass -> [missing] (J0)errors::verify_passes_unexportable_fn_abi_169: [missing] -> pass (J0)errors::verify_passes_unexportable_fn_abi_174: pass -> [missing] (J0)errors::verify_passes_unexportable_generic_fn_168: [missing] -> pass (J0)errors::verify_passes_unexportable_generic_fn_173: pass -> [missing] (J0)errors::verify_passes_unexportable_item_167: [missing] -> pass (J0)errors::verify_passes_unexportable_item_172: pass -> [missing] (J0)errors::verify_passes_unexportable_priv_item_172: [missing] -> pass (J0)errors::verify_passes_unexportable_priv_item_177: pass -> [missing] (J0)errors::verify_passes_unexportable_type_repr_175: pass -> [missing] (J0)errors::verify_passes_unknown_feature_150: [missing] -> pass (J0)errors::verify_passes_unknown_feature_155: pass -> [missing] (J0)errors::verify_passes_unlabeled_cf_in_while_condition_131: pass -> [missing] (J0)errors::verify_passes_unlabeled_in_labeled_block_130: pass -> [missing] (J0)errors::verify_passes_unnecessary_stable_feature_160: [missing] -> pass (J0)errors::verify_passes_unreachable_due_to_uninhabited_156: [missing] -> pass (J0)errors::verify_passes_unreachable_due_to_uninhabited_161: pass -> [missing] (J0)errors::verify_passes_unstable_attr_for_already_stable_feature_146: [missing] -> pass (J0)errors::verify_passes_unsupported_attributes_in_where_166: [missing] -> pass (J0)errors::verify_passes_unused_assign_passed_163: [missing] -> pass (J0)errors::verify_passes_unused_assign_passed_168: pass -> [missing] (J0)errors::verify_passes_unused_capture_maybe_capture_ref_158: [missing] -> pass (J0)errors::verify_passes_unused_var_assigned_only_159: [missing] -> pass (J0)errors::verify_passes_unused_var_maybe_capture_ref_157: [missing] -> pass (J0)errors::verify_passes_unused_var_maybe_capture_ref_162: pass -> [missing] (J0)errors::verify_passes_useless_assignment_133: [missing] -> pass (J0)errors::verify_passes_useless_assignment_138: pass -> [missing] (J0)errors::verify_passes_useless_stability_144: [missing] -> pass (J0)errors::verify_passes_useless_stability_149: pass -> [missing] (J0)
(and 26 additional test diffs)
Additionally, 49 doctest diffs were found. These are ignored, as they are noisy.
Job group index
Test dashboard
Run
cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 1c047506f94cd2d05228eb992b0a6bbed1942349 --output-dir test-dashboard
And then open test-dashboard/index.html in your browser to see an overview of all executed tests.
Job duration changes
- dist-aarch64-apple: 5385.4s -> 6303.5s (17.0%)
- mingw-check-tidy: 66.1s -> 75.9s (14.9%)
- x86_64-rust-for-linux: 2581.5s -> 2922.1s (13.2%)
- dist-apple-various: 7066.4s -> 7994.5s (13.1%)
- x86_64-gnu-llvm-19-1: 3212.7s -> 3627.6s (12.9%)
- i686-gnu-2: 5416.3s -> 6032.3s (11.4%)
- i686-gnu-nopt-1: 7119.2s -> 7908.7s (11.1%)
- x86_64-gnu-llvm-20-1: 3185.7s -> 3508.9s (10.1%)
- x86_64-gnu-debug: 5375.4s -> 5904.6s (9.8%)
- mingw-check-1: 1683.9s -> 1835.7s (9.0%)
How to interpret the job duration changes?
Job durations can vary a lot, based on the actual runner instance that executed the job, system noise, invalidated caches, etc. The table above is provided mostly for t-infra members, for simpler debugging of potential CI slow-downs.
Finished benchmarking commit (1c047506f94cd2d05228eb992b0a6bbed1942349): comparison URL.
Overall result: ❌✅ regressions and improvements - please read the text below
Our benchmarks found a performance regression caused by this PR. This might be an actual regression, but it can also be just noise.
Next Steps:
- If the regression was expected or you think it can be justified,
please write a comment with sufficient written justification, and add
@rustbot label: +perf-regression-triagedto it, to mark the regression as triaged. - If you think that you know of a way to resolve the regression, try to create a new PR with a fix for the regression.
- If you do not understand the regression or you think that it is just noise,
you can ask the
@rust-lang/wg-compiler-performanceworking group for help (members of this group were already notified of this PR).
@rustbot label: +perf-regression cc @rust-lang/wg-compiler-performance
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 |
| Regressions ❌ (secondary) |
0.2% | [0.2%, 0.3%] | 3 |
| Improvements ✅ (primary) |
- | - | 0 |
| Improvements ✅ (secondary) |
-0.3% | [-0.4%, -0.2%] | 8 |
| All ❌✅ (primary) | - | - | 0 |
Max RSS (memory usage)
Results (primary -1.6%, secondary -1.7%)
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) |
2.1% | [1.0%, 3.2%] | 2 |
| Improvements ✅ (primary) |
-1.6% | [-1.6%, -1.6%] | 1 |
| Improvements ✅ (secondary) |
-4.3% | [-8.7%, -1.0%] | 3 |
| All ❌✅ (primary) | -1.6% | [-1.6%, -1.6%] | 1 |
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: 755.082s -> 756.123s (0.14%) Artifact size: 372.15 MiB -> 372.14 MiB (-0.00%)
Perf-wise it's a wash.
@rustbot label: +perf-regression-triaged