Skip to content

Rollup of 11 pull requests #145407

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
merged 41 commits into from
Aug 15, 2025
Merged

Rollup of 11 pull requests #145407

merged 41 commits into from
Aug 15, 2025

Conversation

Kobzol
Copy link
Member

@Kobzol Kobzol commented Aug 14, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

fneddy and others added 30 commits July 30, 2025 13:53
The tests fail on s390x and presumably other big-endian systems,
due to print of raw values and padding bytes.

To fix the tests remove the raw output values in the error note
with `normalize-stderr`.
When operating on expressions, `cfg_select!` can now handle expressions
without braces. (It still requires braces for other things, such as
items.)

Expand the test coverage and documentation accordingly.
So that it is easier to see which was the last started step when a failure happens on CI.
When verbose mode is enabled, it is very hard to see the actually executed steps.
They could easily get out of sync and miss some fields. Now all steps are instrumented automatically.
Useful for optimizing the sequencing of the compiler's own build.
Kobzol added 11 commits August 14, 2025 21:48
…rors

Include whitespace in "remove |" suggestion and make it hidden

Tweak error rendering of patterns with an extra `|` on either end.

Built on rust-lang#137409. Only last commit is relevant.

? ``@compiler-errors``
…_bad, r=compiler-errors

Fix test intrinsic-raw_eq-const-bad for big-endian

The test fails on s390x and presumably other big-endian systems, due to print of raw values. To fix the tests remove the raw output values in the error note with normalize-stderr.
…eyouxu

cfg_select: Support unbraced expressions

Tracking issue for `cfg_select`: rust-lang#115585

When operating on expressions, `cfg_select!` can now handle expressions
without braces. (It still requires braces for other things, such as
items.)

Expand the test coverage and documentation accordingly.

---

I'm not sure whether deciding to extend `cfg_select!` in this way is T-lang or T-libs-api. I've labeled for both, with the request that both teams don't block on each other. :)
Improve tracing in bootstrap

I was annoyed that bootstrap had like 5 separate ways of debugging/tracing/profiling, and it was hard for me to understand how are individual steps executed. This PR tries to unify severla things behind `BOOTSTRAP_TRACING`, and improve tracing/profiling in general:
- All generated tracing outputs are now stored in a single directory to make it easier to examine them, plus bootstrap prepares a `latest` symlink to the latest generated tracing output directory for convenience.
- All executed spans are now logged automatically (without requiring usage of `#[tracing::instrument]`).
- A custom span/event formatter was implemented, to provide domain-specific output (like location of executed commands or spans) and hopefully also to reduce visual clutter.
  - `tracing_forest` was removed. While it did some useful postprocessing, it didn't expose enough information for making the dynamic step spans work.
- You can now explicitly log steps (`STEP=info`) and/or commands (`COMMAND=info`), to have more granular control over what gets logged.
- `print-step-timings` also show when a step starts its execution (not just when it ends it), so that when some step fails in CI, we can actually see what step it was (before we would only see the end of the previous step).
- The rustc-dev-guide page on debugging/profiling bootstrap was updated.

There are still some things that work outside of tracing (`print-step-timings` and `dump-bootstrap-shims`), but I think that for now this improvement is good enough.

I removed the `> step`, `< step` verbose output, because I found it unusable, as verbose bootstrap output also enables verbose Cargo output, and then you simply drown in too much data, and because I think that the new tracing system makes it obsolete (although it does require recompilation with the `tracing` feature). If you want to keep it, happy to revert 690c781. And the information about cached steps is now also shown in the Graphviz step dependency graph.

We can modify the tracing output however we want, as we now implement it ourselves. Notably, we could also show exit logs for step spans, currently I only show enter spans. Maybe creating indents for each executed nested command is also not needed. Happy to hear feedback!

Some further improvements could be to print step durations, if we decide to also log step exit events. We could also try to enable tracing in CI logs, but it might be too verbose.

Best reviewed commit-by-commit.

r? ``@jieyouxu``

CC ``@Shourya742``
…ouxu

Rename and document `ONLY_HOSTS` in bootstrap

Everytime I examined the `ONLY_HOSTS` flag of bootstrap steps, I was utterly confused. Why is it called ONLY_HOSTS? How does the fact that it is skipped if `--target` is passed, but `--host` is not (which was not accurate) help me?

The reality of the flag is that if it is true, the targets for which the given Step will be built is determined based on the `--host` flag, while if it is false, it is determined based on the `--target` flag, that's pretty much it. The previous comment was just a (not very helpful and not even accurate) corollary of that.

I clarified the comment, and also renamed the flag to `IS_HOST` (happy to brainstorm better names, but the doc. comment change is IMO the main improvement).

r? ``@jieyouxu``
bootstrap: Fix jemalloc 64K page support for aarch64 tools

Resolves rust-lang#133748

The prior page size fix only targeted the compile build step, not the tools step: rust-lang#135081

Also note that since `miri` always uses jemalloc, I didn't copy the `builder.config.jemalloc(target)` check to the tools section.

Tested by running `strings` on the compiled `miri` binary to see the LG_PAGE value.

Before:

```
> strings miri | grep '^LG_PAGE'
LG_PAGE 14
```

After:

```
> strings miri | grep '^LG_PAGE'
LG_PAGE 16
```

May also need a separate fix for the standalone miri repository: rust-lang/miri#4514 (likely a change needed in miri-script?)
…jieyouxu

bootstrap: Support passing `--timings` to cargo

Useful for optimizing the sequencing of the compiler's own build.
…yUwU

Rust documentation, use `rustc-dev-guide` :3

reviving rust-lang#145385 but on my own fork this time

r? ``@BoxyUwU``
…er, r=petrochenkov

Use `default_field_values` in `Resolver`

Change `Resolver` to use `feature(default_field_values)`. This change is non-exhaustive, as fields may have been added since I made this commit, and `Fx(Index/Hash)(Map/Set)` types would need to have a `const` constructable to change the majority of the fields left over.

Using default field values should make it easier to review when we add or remove fields to `Resolver` in the future, and highlight which fields are run-time dependent in `Resolver::new`.

r? ``@petrochenkov``
…mpiler-errors

cleanup: Remove useless `[T].iter().last()`
Adjust error message grammar to be less awkward

r? ``@estebank``
@rustbot rustbot added A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 14, 2025
@Kobzol
Copy link
Member Author

Kobzol commented Aug 14, 2025

@bors r+ rollup=never p=5

@rustbot rustbot added the rollup A PR which is a rollup label Aug 14, 2025
@bors
Copy link
Collaborator

bors commented Aug 14, 2025

📌 Commit 0698921 has been approved by Kobzol

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 Aug 14, 2025
@bors
Copy link
Collaborator

bors commented Aug 14, 2025

⌛ Testing commit 0698921 with merge 3507a74...

@bors
Copy link
Collaborator

bors commented Aug 15, 2025

☀️ Test successful - checks-actions
Approved by: Kobzol
Pushing 3507a74 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 15, 2025
@bors bors merged commit 3507a74 into rust-lang:master Aug 15, 2025
11 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 15, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#137872 Include whitespace in "remove |" suggestion and make it hid… c59f0ea6bff00180940b5041b5236f612c1b6f8d (link)
#144631 Fix test intrinsic-raw_eq-const-bad for big-endian 289705442b748bbd8e03bb993f17b3e745200900 (link)
#145233 cfg_select: Support unbraced expressions b7907e96e352637313736f8f7189f34f17d0e22d (link)
#145261 Improve tracing in bootstrap 8ce8d6979ebdd05e3d942c5ca1dcf974ea00786d (link)
#145324 Rename and document ONLY_HOSTS in bootstrap 1dce629e9d2e4e767d80712b43d336ad00714da3 (link)
#145353 bootstrap: Fix jemalloc 64K page support for aarch64 tools c8fc5c9a0cdabfaeaafdfe1fa771ac29a3d5302b (link)
#145379 bootstrap: Support passing --timings to cargo 6db819314edcc493ddd35831019eef5850840ad8 (link)
#145397 Rust documentation, use rustc-dev-guide :3 d29a677fc257da9f0e505aa1e9f3b1bfc7e5ec76 (link)
#145398 Use default_field_values in Resolver 14633aba532b98487456cd1f3a30a882c30d6dc3 (link)
#145401 cleanup: Remove useless [T].iter().last() 46bee03e94de0cbc0a5a145933dd3eabfc52b1b2 (link)
#145403 Adjust error message grammar to be less awkward 85bedd65d58d74173a8186f80a72cdbebb106d18 (link)

previous master: 898aff704d

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

Copy link
Contributor

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 898aff7 (parent) -> 3507a74 (this PR)

Test differences

Show 225 test diffs

Stage 1

  • errors::verify_parse_array_index_offset_of_171: [missing] -> pass (J0)
  • errors::verify_parse_array_index_offset_of_172: pass -> [missing] (J0)
  • errors::verify_parse_asm_expected_comma_185: pass -> [missing] (J0)
  • errors::verify_parse_asm_expected_other_186: pass -> [missing] (J0)
  • errors::verify_parse_asm_expected_register_class_or_explicit_register_189: pass -> [missing] (J0)
  • errors::verify_parse_asm_expected_string_literal_187: [missing] -> pass (J0)
  • errors::verify_parse_asm_expected_string_literal_188: pass -> [missing] (J0)
  • errors::verify_parse_asm_non_abi_186: [missing] -> pass (J0)
  • errors::verify_parse_asm_requires_template_183: [missing] -> pass (J0)
  • errors::verify_parse_asm_requires_template_184: pass -> [missing] (J0)
  • errors::verify_parse_asm_sym_no_path_183: pass -> [missing] (J0)
  • errors::verify_parse_asm_underscore_input_181: [missing] -> pass (J0)
  • errors::verify_parse_asm_underscore_input_182: pass -> [missing] (J0)
  • errors::verify_parse_asm_unsupported_operand_180: [missing] -> pass (J0)
  • errors::verify_parse_async_impl_173: [missing] -> pass (J0)
  • errors::verify_parse_async_impl_174: pass -> [missing] (J0)
  • errors::verify_parse_at_dot_dot_in_struct_pattern_129: [missing] -> pass (J0)
  • errors::verify_parse_at_dot_dot_in_struct_pattern_130: pass -> [missing] (J0)
  • errors::verify_parse_attr_after_generic_146: pass -> [missing] (J0)
  • errors::verify_parse_attr_without_generics_146: [missing] -> pass (J0)
  • errors::verify_parse_attr_without_generics_147: pass -> [missing] (J0)
  • errors::verify_parse_bad_assoc_type_bounds_144: [missing] -> pass (J0)
  • errors::verify_parse_bad_return_type_notation_output_143: [missing] -> pass (J0)
  • errors::verify_parse_binder_and_polarity_178: [missing] -> pass (J0)
  • errors::verify_parse_binder_and_polarity_179: pass -> [missing] (J0)
  • errors::verify_parse_binder_before_modifiers_178: pass -> [missing] (J0)
  • errors::verify_parse_box_not_pat_162: [missing] -> pass (J0)
  • errors::verify_parse_dot_dot_dot_for_remaining_fields_131: [missing] -> pass (J0)
  • errors::verify_parse_dot_dot_dot_for_remaining_fields_132: pass -> [missing] (J0)
  • errors::verify_parse_dot_dot_dot_range_to_pattern_not_allowed_127: [missing] -> pass (J0)
  • errors::verify_parse_dot_dot_range_attribute_176: pass -> [missing] (J0)
  • errors::verify_parse_dotdotdot_rest_pattern_120: [missing] -> pass (J0)
  • errors::verify_parse_dotdotdot_rest_pattern_121: pass -> [missing] (J0)
  • errors::verify_parse_dyn_after_mut_138: [missing] -> pass (J0)
  • errors::verify_parse_enum_pattern_instead_of_identifier_129: pass -> [missing] (J0)
  • errors::verify_parse_expect_label_found_ident_152: [missing] -> pass (J0)
  • errors::verify_parse_expect_label_found_ident_153: pass -> [missing] (J0)
  • errors::verify_parse_expected_builtin_ident_168: [missing] -> pass (J0)
  • errors::verify_parse_expected_comma_after_pattern_field_132: [missing] -> pass (J0)
  • errors::verify_parse_expected_comma_after_pattern_field_133: pass -> [missing] (J0)
  • errors::verify_parse_expected_mut_or_const_in_raw_pointer_type_136: [missing] -> pass (J0)
  • errors::verify_parse_expected_mut_or_const_in_raw_pointer_type_137: pass -> [missing] (J0)
  • errors::verify_parse_expr_rarrow_call_175: pass -> [missing] (J0)
  • errors::verify_parse_fn_pointer_cannot_be_async_140: [missing] -> pass (J0)
  • errors::verify_parse_fn_pointer_cannot_be_async_141: pass -> [missing] (J0)
  • errors::verify_parse_fn_pointer_cannot_be_const_139: [missing] -> pass (J0)
  • errors::verify_parse_fn_pointer_cannot_be_const_140: pass -> [missing] (J0)
  • errors::verify_parse_generic_args_in_pat_require_turbofish_syntax_170: [missing] -> pass (J0)
  • errors::verify_parse_generic_args_in_pat_require_turbofish_syntax_171: pass -> [missing] (J0)
  • errors::verify_parse_inappropriate_default_153: [missing] -> pass (J0)
  • errors::verify_parse_inappropriate_default_154: pass -> [missing] (J0)
  • errors::verify_parse_invalid_attr_unsafe_176: [missing] -> pass (J0)
  • errors::verify_parse_invalid_attr_unsafe_177: pass -> [missing] (J0)
  • errors::verify_parse_invalid_dyn_keyword_142: [missing] -> pass (J0)
  • errors::verify_parse_invalid_dyn_keyword_143: pass -> [missing] (J0)
  • errors::verify_parse_invalid_offset_of_172: [missing] -> pass (J0)
  • errors::verify_parse_invalid_offset_of_173: pass -> [missing] (J0)
  • errors::verify_parse_kw_bad_case_166: pass -> [missing] (J0)
  • errors::verify_parse_lifetime_after_mut_137: [missing] -> pass (J0)
  • errors::verify_parse_lifetime_after_mut_138: pass -> [missing] (J0)
  • errors::verify_parse_lifetime_in_eq_constraint_149: [missing] -> pass (J0)
  • errors::verify_parse_macro_invocation_visibility_160: [missing] -> pass (J0)
  • errors::verify_parse_macro_invocation_visibility_161: pass -> [missing] (J0)
  • errors::verify_parse_macro_name_remove_bang_159: pass -> [missing] (J0)
  • errors::verify_parse_macro_rules_missing_bang_157: [missing] -> pass (J0)
  • errors::verify_parse_macro_rules_missing_bang_158: pass -> [missing] (J0)
  • errors::verify_parse_macro_rules_visibility_159: [missing] -> pass (J0)
  • errors::verify_parse_macro_rules_visibility_160: pass -> [missing] (J0)
  • errors::verify_parse_malformed_cfg_attr_166: [missing] -> pass (J0)
  • errors::verify_parse_missing_plus_in_bounds_165: pass -> [missing] (J0)
  • errors::verify_parse_modifier_lifetime_151: pass -> [missing] (J0)
  • errors::verify_parse_modifiers_and_polarity_179: [missing] -> pass (J0)
  • errors::verify_parse_modifiers_and_polarity_180: pass -> [missing] (J0)
  • errors::verify_parse_mut_on_nested_ident_pattern_124: [missing] -> pass (J0)
  • errors::verify_parse_mut_on_nested_ident_pattern_125: pass -> [missing] (J0)
  • errors::verify_parse_mut_on_non_ident_pattern_126: pass -> [missing] (J0)
  • errors::verify_parse_need_plus_after_trait_object_lifetime_135: [missing] -> pass (J0)
  • errors::verify_parse_nested_c_variadic_type_142: pass -> [missing] (J0)
  • errors::verify_parse_pattern_on_wrong_side_of_at_121: [missing] -> pass (J0)
  • errors::verify_parse_recover_import_as_use_154: [missing] -> pass (J0)
  • errors::verify_parse_recover_import_as_use_155: pass -> [missing] (J0)
  • errors::verify_parse_repeated_mut_in_pattern_126: [missing] -> pass (J0)
  • errors::verify_parse_repeated_mut_in_pattern_127: pass -> [missing] (J0)
  • errors::verify_parse_return_types_use_thin_arrow_134: [missing] -> pass (J0)
  • errors::verify_parse_return_types_use_thin_arrow_135: pass -> [missing] (J0)
  • errors::verify_parse_single_colon_import_path_155: [missing] -> pass (J0)
  • errors::verify_parse_single_colon_import_path_156: pass -> [missing] (J0)
  • errors::verify_parse_static_with_generics_169: [missing] -> pass (J0)
  • errors::verify_parse_static_with_generics_170: pass -> [missing] (J0)
  • errors::verify_parse_trailing_vert_not_allowed_120: pass -> [missing] (J0)
  • errors::verify_parse_underscore_literal_suffix_151: [missing] -> pass (J0)
  • errors::verify_parse_underscore_literal_suffix_152: pass -> [missing] (J0)
  • errors::verify_parse_unexpected_expr_in_pat_133: [missing] -> pass (J0)
  • errors::verify_parse_unexpected_lifetime_in_pattern_124: pass -> [missing] (J0)
  • errors::verify_parse_unknown_builtin_construct_167: [missing] -> pass (J0)
  • errors::verify_parse_unknown_builtin_construct_168: pass -> [missing] (J0)
  • errors::verify_parse_unmatched_angle_163: [missing] -> pass (J0)
  • errors::verify_parse_unmatched_angle_164: pass -> [missing] (J0)
  • errors::verify_parse_where_generics_147: [missing] -> pass (J0)
  • errors::verify_parse_where_generics_148: pass -> [missing] (J0)

(and 39 additional test diffs)

Additionally, 86 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 3507a749b365aae4eefa96ab700a9315d3280ee7 --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

  1. x86_64-apple-1: 12966.9s -> 6428.2s (-50.4%)
  2. dist-aarch64-apple: 8023.0s -> 5388.6s (-32.8%)
  3. dist-x86_64-apple: 11948.1s -> 9657.9s (-19.2%)
  4. pr-check-1: 1765.3s -> 1448.5s (-17.9%)
  5. test-various: 5989.9s -> 4946.3s (-17.4%)
  6. x86_64-apple-2: 5134.8s -> 5851.4s (14.0%)
  7. dist-loongarch64-linux: 5960.5s -> 6682.0s (12.1%)
  8. i686-gnu-2: 6057.2s -> 5392.1s (-11.0%)
  9. aarch64-gnu-llvm-19-2: 2628.0s -> 2385.1s (-9.2%)
  10. x86_64-msvc-2: 7665.6s -> 6969.5s (-9.1%)
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup 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) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants