Skip to content

Rollup of 9 pull requests #143746

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 25 commits into from
Jul 10, 2025
Merged

Rollup of 9 pull requests #143746

merged 25 commits into from
Jul 10, 2025

Conversation

matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Jul 10, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Kobzol and others added 25 commits July 7, 2025 23:06
instead of a new panic

For unwinding with SEH, we currently construct a C++ exception with the
panic data. Being a regular C++ exception, it interacts with the C++
exception handling machinery and can be retrieved via
`std::current_exception`, which needs to copy the exception. We can't
support that, so we panic, which throws another exception, which the
C++ runtime tries to copy and store into the exception_ptr, which panics
again, which causes the C++ runtime to store a `bad_exception` instance.

However, this doesn't work because the panics thrown by the copy
function will be dropped without being rethrown, and causes unnecessary
log spam in stderr. Fix this by directly throwing an exception without
data, which doesn't cause log spam and can be dropped without being
rethrown.
Bootstrap already had a manual doc filter for the `sysroot` crate, but
other library crates keep themselves out of the public docs by setting
`[lib] doc = false` in their manifest. This seems like a better solution
to hide `compiler-builtins` docs, and removes the `sysroot` hack too.
…r=bjorn3,oli-obk

use `--dynamic-list` for exporting executable symbols

closes rust-lang#101610
cc rust-lang#84161

https://sourceware.org/binutils/docs-2.39/ld/VERSION.html:

> --dynamic-list=dynamic-list-file
Specify the name of a dynamic list file to the linker. This is typically used when creating shared libraries to specify a list of global symbols whose references shouldn’t be bound to the definition within the shared library, or creating dynamically linked executables to specify a list of symbols which should be added to the symbol table in the executable. This option is only meaningful on ELF platforms which support shared libraries.

`ld.lld --help`:

>   --dynamic-list=<file>: Similar to --export-dynamic-symbol-list. When creating a shared object, this additionally implies -Bsymbolic but does not set DF_SYMBOLIC

>  --export-dynamic-symbol-list=file: Read a list of dynamic symbol patterns. Apply --export-dynamic-symbol on each pattern

>  --export-dynamic-symbol=glob: (executable) Put matched symbols in the dynamic symbol table. (shared object) References to matched non-local STV_DEFAULT symbols shouldn't be bound to definitions within the shared object. Does not imply -Bsymbolic.

>  --export-dynamic: Put symbols in the dynamic symbol table

Use `--dynamic-list` because it's older than `--export-dynamic-symbol-list` (binutils 2.35)

try-job: dist-i586-gnu-i586-i686-musl
… r=lolbinary

Fix weird rustdoc output when single and glob reexport conflict on a name

Fixes rust-lang#143107.

The problem was that the second reexport would overwrite the first, leading to having unexpected results. To fix it, I now group items by their original `DefId` and their name and keep tracks of all imports for this item (should very rarely be more than one though, and even less often more than 2).

cc `@lolbinarycat`
…aked-asm, r=Amanieu

emit `.att_syntax` when global/naked asm use that option

fixes rust-lang#143542

LLVM would error when using `-Cllvm-args=-x86-asm-syntax=intel` in combination with global/naked assembly with `att_syntax`. It turns out that for LLVM you do in this case need to emit `.att_syntax`.

r? `@Amanieu`
Fix handling of no_std targets in `doc::Std` step

The previous logic was wrong for no_std targets, it just didn't do anything. The logic was added there because by default, the `Std` step would otherwise have a list of all std crates to check, but these would fail for no_std targets. What has to happen instead is to select the default set of packages to check/doc/build, which currently happens in the `std_cargo` function, but the `self.crates` list was overriding that.

In general, using `crates: Vec<String>` in the `Std` steps is quite fishy, because it's difficult to distinguish between all crates (either they are all enumerated or `crates` is empty) and the default (e.g. `x <kind> [library]`) vs a subset (e.g. `x <kind> core`). I wanted to improve that using an enum that would distinguish these situations, avoid passing `-p` for all of the crates explicitly, and unify the selection of packages to compile/check/... in `std_cargo`, based on this enum.

However, I found out from some other bootstrap comments that when you pass `-p` explicitly for all crates, cargo behaves differently (apparently for check it will also check targets/examples etc. with `-p`, but not without it). Furthermore, the doc step has a special case where it does not document the `sysroot` package. So as usually, unifying this logic would get into some edge cases... So instead I opted for a seemingly simpler solution, where I try to prefilter only two allowed crates (core and alloc) for no_std targets in the `std_crates_for_run_make` function.

It's not perfect, but I think it's better than the status quo (words to live by when working on bootstrap...).

Fixes [this Zulip topic](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/docs.20for.20non-host.20targets.3F).

r? `@jieyouxu`
fix: correct parameter names in LLVMRustBuildMinNum and LLVMRustBuildMaxNum FFI declarations
…r-errors

Constify `Fn*` traits

r? `@compiler-errors` `@fee1-dead`

this should unlock a few things. A few `const_closures` tests have broken even more than before, but that feature is marked as incomplete anyway

cc rust-lang#67792
…isDenton

Win: Use exceptions with empty data for SEH panic exception copies instead of a new panic

For unwinding with SEH, we currently construct a C++ exception with the panic data. Being a regular C++ exception, it interacts with the C++ exception handling machinery and can be retrieved via `std::current_exception`, which needs to copy the exception. We can't support that, so we panic, which throws another exception, which the C++ runtime tries to copy and store into the exception_ptr, which panics again, which causes the C++ runtime to store a `bad_exception` instance.

However, this doesn't work because the panics thrown by the copy function will be dropped without being rethrown, and causes unnecessary log spam in stderr. Fix this by directly throwing an exception without data, which doesn't cause log spam and can be dropped without being rethrown.

Fixes rust-lang#143623.

This also happens to be the solution ``@dpaoliello`` suggested, though I'm not sure how to handle the commit credit attribution.
Disable docs for `compiler-builtins` and `sysroot`

Bootstrap already had a manual doc filter for the `sysroot` crate, but
other library crates keep themselves out of the public docs by setting
`[lib] doc = false` in their manifest. This seems like a better solution
to hide `compiler-builtins` docs, and removes the `sysroot` hack too.

Fixes rust-lang#143215 (after backport)
```@rustbot``` label beta-nominated
…aDotInTheVoid

[rustdoc-json] Add tests for `#[doc(hidden)]` handling of items.

Add tests which check:
- `#[doc(hidden)]` items are not present in rustdoc JSON output by default.
- Invoking rustdoc with `--document-hidden-items` makes `#[doc(hidden)]` items appear, and they show their `#[doc(hidden)]` status appropriately.

r? `@aDotInTheVoid`
@rustbot rustbot added A-compiler-builtins Area: compiler-builtins (https://github.com/rust-lang/compiler-builtins) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-rustdoc-json Area: Rustdoc JSON backend 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 Jul 10, 2025
@rustbot rustbot added 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. rollup A PR which is a rollup labels Jul 10, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Jul 10, 2025

📌 Commit b5d1b92 has been approved by matthiaskrgr

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 Jul 10, 2025
@bors
Copy link
Collaborator

bors commented Jul 10, 2025

⌛ Testing commit b5d1b92 with merge 2a023bf...

@bors
Copy link
Collaborator

bors commented Jul 10, 2025

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 2a023bf to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 10, 2025
@bors bors merged commit 2a023bf into rust-lang:master Jul 10, 2025
1 check passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 10, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#143446 use --dynamic-list for exporting executable symbols a3c15ce8827bfb7955e142352eed1cacfda52c51 (link)
#143590 Fix weird rustdoc output when single and glob reexport conf… 71bebc07b558ac3cfea5da484e9e247d80b8c0ad (link)
#143599 emit .att_syntax when global/naked asm use that option 68951f5dd7340510c3b9856edc4272d75c2fc288 (link)
#143615 Fix handling of no_std targets in doc::Std step ea97b780a567688ef86dd8d87b6d66f5f85ab3b1 (link)
#143632 fix: correct parameter names in LLVMRustBuildMinNum and LLV… 4c2c7c07d0f55d20773f124cd8acf2e1d2ac4db6 (link)
#143640 Constify Fn* traits d212a263bcb0732490038208e1836acf36e261f7 (link)
#143651 Win: Use exceptions with empty data for SEH panic exception… 9badf7f669c433bec5c06c53f41680e0b8cc0073 (link)
#143660 Disable docs for compiler-builtins and sysroot 5d5340bcea680f9e4524148141f1f956981d087f (link)
#143665 [rustdoc-json] Add tests for #[doc(hidden)] handling of i… 013f602495f130723ff7ca2db531583ca80413c5 (link)

previous master: a9f2aad045

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 a9f2aad (parent) -> 2a023bf (this PR)

Test differences

Show 116 test diffs

Stage 0

  • core::builder::tests::snapshot::doc_core: [missing] -> pass (J0)
  • core::builder::tests::snapshot::doc_core_no_std_target: [missing] -> pass (J0)
  • core::builder::tests::snapshot::doc_library: [missing] -> pass (J0)
  • core::builder::tests::snapshot::doc_library_no_std_target: [missing] -> pass (J0)
  • core::builder::tests::snapshot::doc_library_no_std_target_cross_compile: [missing] -> pass (J0)

Stage 1

  • errors::verify_hir_typeck_abi_cannot_be_called_33: [missing] -> pass (J0)
  • errors::verify_hir_typeck_abi_cannot_be_called_35: pass -> [missing] (J0)
  • errors::verify_hir_typeck_arg_mismatch_indeterminate_15: [missing] -> pass (J0)
  • errors::verify_hir_typeck_arg_mismatch_indeterminate_17: pass -> [missing] (J0)
  • errors::verify_hir_typeck_break_inside_closure_18: [missing] -> pass (J0)
  • errors::verify_hir_typeck_break_inside_closure_20: pass -> [missing] (J0)
  • errors::verify_hir_typeck_break_inside_coroutine_19: [missing] -> pass (J0)
  • errors::verify_hir_typeck_break_inside_coroutine_21: pass -> [missing] (J0)
  • errors::verify_hir_typeck_cast_enum_drop_23: [missing] -> pass (J0)
  • errors::verify_hir_typeck_cast_enum_drop_25: pass -> [missing] (J0)
  • errors::verify_hir_typeck_cast_thin_pointer_to_wide_pointer_25: [missing] -> pass (J0)
  • errors::verify_hir_typeck_cast_thin_pointer_to_wide_pointer_27: pass -> [missing] (J0)
  • errors::verify_hir_typeck_const_continue_bad_label_34: [missing] -> pass (J0)
  • errors::verify_hir_typeck_const_continue_bad_label_36: pass -> [missing] (J0)
  • errors::verify_hir_typeck_const_select_must_be_const_13: pass -> [missing] (J0)
  • errors::verify_hir_typeck_const_select_must_be_fn_14: pass -> [missing] (J0)
  • errors::verify_hir_typeck_continue_labeled_block_17: [missing] -> pass (J0)
  • errors::verify_hir_typeck_continue_labeled_block_19: pass -> [missing] (J0)
  • errors::verify_hir_typeck_ctor_is_private_24: [missing] -> pass (J0)
  • errors::verify_hir_typeck_ctor_is_private_26: pass -> [missing] (J0)
  • errors::verify_hir_typeck_fn_item_to_variadic_function_27: [missing] -> pass (J0)
  • errors::verify_hir_typeck_fn_item_to_variadic_function_29: pass -> [missing] (J0)
  • errors::verify_hir_typeck_naked_asm_outside_naked_fn_29: [missing] -> pass (J0)
  • errors::verify_hir_typeck_naked_asm_outside_naked_fn_31: pass -> [missing] (J0)
  • errors::verify_hir_typeck_naked_functions_must_naked_asm_32: [missing] -> pass (J0)
  • errors::verify_hir_typeck_naked_functions_must_naked_asm_34: pass -> [missing] (J0)
  • errors::verify_hir_typeck_no_associated_item_22: [missing] -> pass (J0)
  • errors::verify_hir_typeck_no_associated_item_24: pass -> [missing] (J0)
  • errors::verify_hir_typeck_no_patterns_30: [missing] -> pass (J0)
  • errors::verify_hir_typeck_no_patterns_32: pass -> [missing] (J0)
  • errors::verify_hir_typeck_params_not_allowed_31: [missing] -> pass (J0)
  • errors::verify_hir_typeck_params_not_allowed_33: pass -> [missing] (J0)
  • errors::verify_hir_typeck_pass_to_variadic_function_26: [missing] -> pass (J0)
  • errors::verify_hir_typeck_pass_to_variadic_function_28: pass -> [missing] (J0)
  • errors::verify_hir_typeck_register_type_unstable_28: [missing] -> pass (J0)
  • errors::verify_hir_typeck_register_type_unstable_30: pass -> [missing] (J0)
  • errors::verify_hir_typeck_trivial_cast_16: [missing] -> pass (J0)
  • errors::verify_hir_typeck_trivial_cast_18: pass -> [missing] (J0)
  • errors::verify_hir_typeck_union_pat_dotdot_14: [missing] -> pass (J0)
  • errors::verify_hir_typeck_union_pat_dotdot_16: pass -> [missing] (J0)
  • errors::verify_hir_typeck_union_pat_multiple_fields_13: [missing] -> pass (J0)
  • errors::verify_hir_typeck_union_pat_multiple_fields_15: pass -> [missing] (J0)
  • errors::verify_hir_typeck_unlabeled_cf_in_while_condition_21: [missing] -> pass (J0)
  • errors::verify_hir_typeck_unlabeled_cf_in_while_condition_23: pass -> [missing] (J0)
  • errors::verify_hir_typeck_unlabeled_in_labeled_block_20: [missing] -> pass (J0)
  • errors::verify_hir_typeck_unlabeled_in_labeled_block_22: pass -> [missing] (J0)
  • [assembly] tests/assembly/emit-intel-att-syntax.rs#att: [missing] -> pass (J2)
  • [assembly] tests/assembly/emit-intel-att-syntax.rs#intel: [missing] -> pass (J2)
  • [rustdoc-json] tests/rustdoc-json/visibility/doc_hidden_default.rs: [missing] -> pass (J2)
  • [rustdoc-json] tests/rustdoc-json/visibility/doc_hidden_documented.rs: [missing] -> pass (J2)
  • [rustdoc] tests/rustdoc/reexport/merge-glob-and-non-glob.rs: [missing] -> pass (J2)
  • [ui] tests/ui/linking/export-executable-symbols.rs: [missing] -> pass (J2)
  • [ui] tests/ui/traits/const-traits/const-closure-trait-method.rs: pass -> [missing] (J2)
  • [ui] tests/ui/traits/const-traits/const-closure-trait-method.rs#next: [missing] -> pass (J2)
  • [ui] tests/ui/traits/const-traits/const-closure-trait-method.rs#old: [missing] -> pass (J2)
  • [ui] tests/ui/traits/const-traits/const-closures.rs: pass -> [missing] (J2)
  • [ui] tests/ui/traits/const-traits/const-closures.rs#next: [missing] -> pass (J2)
  • [ui] tests/ui/traits/const-traits/const-closures.rs#old: [missing] -> pass (J2)
  • [ui] tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.rs: pass -> [missing] (J2)

Stage 2

  • [ui] tests/ui/traits/const-traits/const-closure-trait-method.rs: pass -> [missing] (J1)
  • [ui] tests/ui/traits/const-traits/const-closure-trait-method.rs#next: [missing] -> pass (J1)
  • [ui] tests/ui/traits/const-traits/const-closure-trait-method.rs#old: [missing] -> pass (J1)
  • [ui] tests/ui/traits/const-traits/const-closures.rs: pass -> [missing] (J1)
  • [ui] tests/ui/traits/const-traits/const-closures.rs#next: [missing] -> pass (J1)
  • [ui] tests/ui/traits/const-traits/const-closures.rs#old: [missing] -> pass (J1)
  • [ui] tests/ui/traits/const-traits/ice-123664-unexpected-bound-var.rs: pass -> [missing] (J1)
  • [assembly] tests/assembly/emit-intel-att-syntax.rs#att: [missing] -> ignore (only executed when the architecture is x86_64) (J3)
  • [assembly] tests/assembly/emit-intel-att-syntax.rs#intel: [missing] -> ignore (only executed when the architecture is x86_64) (J3)
  • [assembly] tests/assembly/emit-intel-att-syntax.rs#att: [missing] -> pass (J4)
  • [assembly] tests/assembly/emit-intel-att-syntax.rs#intel: [missing] -> pass (J4)
  • [ui] tests/ui/linking/export-executable-symbols.rs: [missing] -> ignore (only executed when the operating system is linux) (J5)
  • [ui] tests/ui/linking/export-executable-symbols.rs: [missing] -> ignore (only executed when the target environment is gnu) (J6)
  • [rustdoc-json] tests/rustdoc-json/visibility/doc_hidden_default.rs: [missing] -> pass (J7)
  • [rustdoc-json] tests/rustdoc-json/visibility/doc_hidden_documented.rs: [missing] -> pass (J7)
  • [rustdoc] tests/rustdoc/reexport/merge-glob-and-non-glob.rs: [missing] -> pass (J8)
  • [ui] tests/ui/linking/export-executable-symbols.rs: [missing] -> pass (J9)

Additionally, 35 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 2a023bf80a6fbd6a06d5460a34eb247b986286ed --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-2: 6118.2s -> 3970.3s (-35.1%)
  2. x86_64-rust-for-linux: 2496.1s -> 2863.7s (14.7%)
  3. pr-check-1: 1507.7s -> 1699.5s (12.7%)
  4. dist-x86_64-apple: 9556.9s -> 8509.0s (-11.0%)
  5. dist-apple-various: 6751.4s -> 7454.0s (10.4%)
  6. aarch64-apple: 5029.6s -> 5539.1s (10.1%)
  7. pr-check-2: 2200.5s -> 2409.3s (9.5%)
  8. dist-aarch64-apple: 6029.2s -> 5467.4s (-9.3%)
  9. i686-gnu-2: 5491.8s -> 5990.2s (9.1%)
  10. aarch64-gnu-debug: 3714.0s -> 4049.6s (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.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2a023bf): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

@rustbot label: -perf-regression

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.4% [0.4%, 0.4%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.2% [-0.2%, -0.2%] 2
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (secondary -3.8%)

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)
1.7% [1.7%, 1.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.8% [-6.9%, -1.9%] 6
All ❌✅ (primary) - - 0

Cycles

Results (primary -2.8%, secondary -7.1%)

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)
3.3% [3.3%, 3.3%] 1
Improvements ✅
(primary)
-2.8% [-3.3%, -2.3%] 5
Improvements ✅
(secondary)
-8.9% [-11.9%, -4.9%] 6
All ❌✅ (primary) -2.8% [-3.3%, -2.3%] 5

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 465.348s -> 464.256s (-0.23%)
Artifact size: 374.58 MiB -> 374.58 MiB (0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiler-builtins Area: compiler-builtins (https://github.com/rust-lang/compiler-builtins) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-rustdoc-json Area: Rustdoc JSON backend 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.