Skip to content

Rollup of 7 pull requests - #147140

Merged
bors merged 18 commits into
rust-lang:masterfrom
Zalathar:rollup-rtnqek7
Sep 29, 2025
Merged

Rollup of 7 pull requests#147140
bors merged 18 commits into
rust-lang:masterfrom
Zalathar:rollup-rtnqek7

Conversation

@Zalathar

@ZalatharZalathar commented Sep 29, 2025

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

npmccallumand others added 18 commits September 24, 2025 09:21
When a tuple-struct is re-exported that has inaccessible fields at the `use` scope, the type's constructor cannot be accessed through that re-export. We now account for this case and extend the resulting resolution error. We also check if the constructor would be accessible directly, not through the re-export, and if so, we suggest using the full path instead.
```
error[E0423]: cannot initialize a tuple struct which contains private fields
--> $DIR/ctor-not-accessible-due-to-inaccessible-field-in-reexport.rs:12:33
|
LL | let crate::Foo(x) = crate::Foo(42);
| ^^^^^^^^^^
|
note: the type is accessed through this re-export, but the type's constructor is not visible in this import's scope due to private fields
--> $DIR/ctor-not-accessible-due-to-inaccessible-field-in-reexport.rs:3:9
|
LL | pub use my_mod::Foo;
| ^^^^^^^^^^^
help: the type can be constructed directly, because its fields are available from the current scope
|
LL | let crate::Foo(x) = crate::my_mod::Foo(42);
| ~~~~~~~~~~~~~~~~~~
```
Fixrust-lang#133343.
Detect tuple structs that are unconstructable due to re-export
When a tuple-struct is re-exported that has inaccessible fields at the `use` scope, the type's constructor cannot be accessed through that re-export. We now account for this case and extend the resulting resolution error. We also check if the constructor would be accessible directly, not through the re-export, and if so, we suggest using the full path instead.
```
error[E0423]: cannot initialize a tuple struct which contains private fields
--> $DIR/ctor-not-accessible-due-to-inaccessible-field-in-reexport.rs:12:33
|
LL | let crate::Foo(x) = crate::Foo(42);
| ^^^^^^^^^^
|
note: the type is accessed through this re-export, but the type's constructor is not visible in this import's scope due to private fields
--> $DIR/ctor-not-accessible-due-to-inaccessible-field-in-reexport.rs:3:9
|
LL | pub use my_mod::Foo;
| ^^^^^^^^^^^
help: the type can be constructed directly, because its fields are available from the current scope
|
LL | let crate::Foo(x) = crate::my_mod::Foo(42);
| ~~~~~~~~~~~~~~~~~~
```
Fixrust-lang#133343.
compiletest: Remove old-output-capture and become a stage0 bootstrap tool
The new compiletest output-capture system became the default in rust-lang#146574, and no problems have been reported since.
This PR therefore removes the old output-capture implementation from compiletest, and adjusts bootstrap to always build and test compiletest as a stage0 bootstrap tool.
In other words, compiletest no longer relies on any unstable features (such as `libtest` or `internal_output_capture`), and is now written entirely in stable Rust!
The compiletest self-tests still need access to an in-tree rustc, in order to obtain information via `rustc --print`, so we interpret `--stage` as indicating the stage of that secondary compiler, but always use the stage0 compiler to build compiletest itself.
r? Kobzol
…iler-errors
Do not compute optimized MIR if code does not type-check.
Since rust-lang#128612, we compute optimized MIR when `-Zvalidate-mir` is present.
This is done as part of required analyses, even if type-checking fails. This causes ICEs, as most of the mir-opt pipeline expects well-formed code.
Fixesrust-lang#129095Fixesrust-lang#134174Fixesrust-lang#134654Fixesrust-lang#135570Fixesrust-lang#136381Fixesrust-lang#137468Fixesrust-lang#144491Fixesrust-lang#147011
This does not fix issue rust-lang#137190, as it ICEs without `-Zvalidate-mir`.
r? ``@compiler-errors``
all 48 keywords in just 300 characters
new test case in, all 48 keywords in just 300 characters
https://doc.rust-lang.org/reference/keywords.html
Fix some crash-test directives
- 120175 fails to crash for non-ELF targets; presumably this wasn't noticed because the CI jobs don't enable rustc assertions for non-ELF hosts.
- 34127, 125722, and 131292 have `only-x86_64`, which is overly specific.
- Unnecessary x86 directives cause friction for contributors using aarch64, especially now that many PR CI jobs also use aarch64.
r? ghost
…orn3
Add a leading dash to linker plugin arguments in the gcc codegen
Fixrust-lang#130583
r? ``@bjorn3``
@rustbotrustbot added A-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc 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. rollup A PR which is a rollup labels Sep 29, 2025
@Zalathar

Copy link
Copy Markdown
MemberAuthor

@bors r+ rollup=never p=5

@bors

bors commented Sep 29, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit af8af6c has been approved by Zalathar

It is now in the queue for this repository.

@borsbors 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 Sep 29, 2025
@bors

bors commented Sep 29, 2025

Copy link
Copy Markdown
Collaborator

⌛ Testing commit af8af6c with merge 7af913f...

@ZalatharZalathar mentioned this pull request Sep 29, 2025
@bors

bors commented Sep 29, 2025

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: Zalathar
Pushing 7af913f to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Sep 29, 2025
@bors
bors merged commit 7af913f into rust-lang:masterSep 29, 2025
11 checks passed
@rustbotrustbot added this to the 1.92.0 milestone Sep 29, 2025
@rust-timer

Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR#MessagePerf Build Sha
#133477Detect tuple structs that are unconstructable due to re-exp…d7fb5d15523b3661b3daf169c6ca2419819490f3 (link)
#146929compiletest: Remove old-output-capture and become a stage0 …7ecf2293fc5f7db7b6025778ae24f7d3ee0c37da (link)
#146979constify Default on Nanoseconds61aafb4f44c089337e2090ff2935ce8bed62ce3a (link)
#147092Do not compute optimized MIR if code does not type-check.5e08e7f9ce01f06592be995d4e9e2a5f34ce69b5 (link)
#147112all 48 keywords in just 300 characters273267e853dac6a5d99887891875025d4b8fd411 (link)
#147122Fix some crash-test directives5abe50e198f4401a9dc2b6bdaec278de107b1951 (link)
#147127Add a leading dash to linker plugin arguments in the gcc co…a1c98ef1f039cd5afa581a6258562c045142c3d4 (link)

previous master: 772f380092

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

@github-actions

Copy link
Copy Markdown
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 772f380 (parent) -> 7af913f (this PR)

Test differences

Show 155 test diffs

Stage 0

  • directives::tests::asm_support: [missing] -> pass (J1)
  • directives::tests::aux_build: [missing] -> pass (J1)
  • directives::tests::cross_compile: [missing] -> pass (J1)
  • directives::tests::debugger: [missing] -> pass (J1)
  • directives::tests::git_hash: [missing] -> pass (J1)
  • directives::tests::ignore_arch: [missing] -> pass (J1)
  • directives::tests::ignore_target: [missing] -> pass (J1)
  • directives::tests::llvm_version: [missing] -> pass (J1)
  • directives::tests::matches_abi: [missing] -> pass (J1)
  • directives::tests::matches_os: [missing] -> pass (J1)
  • directives::tests::only_target: [missing] -> pass (J1)
  • directives::tests::revisions: [missing] -> pass (J1)
  • directives::tests::rustc_debug_assertions: [missing] -> pass (J1)
  • directives::tests::sanitizers: [missing] -> pass (J1)
  • directives::tests::should_fail: [missing] -> pass (J1)
  • directives::tests::stage: [missing] -> pass (J1)
  • directives::tests::std_debug_assertions: [missing] -> pass (J1)
  • directives::tests::test_assembly_mode_forbidden_revisions: [missing] -> pass (J1)
  • directives::tests::test_duplicate_revisions: [missing] -> pass (J1)
  • directives::tests::test_error_annotation_no_error: [missing] -> pass (J1)
  • directives::tests::test_extract_llvm_version: [missing] -> pass (J1)
  • directives::tests::test_llvm_version_invalid_components: [missing] -> pass (J1)
  • directives::tests::test_llvm_version_invalid_prefix: [missing] -> pass (J1)
  • directives::tests::test_miropt_mode_forbidden_revisions: [missing] -> pass (J1)
  • directives::tests::test_needs_target_std: [missing] -> pass (J1)
  • directives::tests::test_non_rs_unknown_directive_not_checked: [missing] -> pass (J1)
  • directives::tests::test_not_trailing_directive: [missing] -> pass (J1)
  • directives::tests::test_rustc_abi: [missing] -> pass (J1)
  • directives::tests::test_supported_crate_types: [missing] -> pass (J1)
  • directives::tests::test_trailing_directive: [missing] -> pass (J1)
  • directives::tests::test_trailing_directive_with_comment: [missing] -> pass (J1)
  • directives::tests::test_unknown_directive_check: [missing] -> pass (J1)
  • directives::tests::wasm_special: [missing] -> pass (J1)
  • errors::tests::test_parse_expected_matching: [missing] -> pass (J1)
  • read2::tests::test_abbreviate_filters_can_still_cause_abbreviations: [missing] -> pass (J1)
  • read2::tests::test_abbreviate_filterss_are_detected: [missing] -> pass (J1)
  • read2::tests::test_abbreviate_long_string: [missing] -> pass (J1)
  • read2::tests::test_abbreviate_short_string: [missing] -> pass (J1)
  • read2::tests::test_abbreviate_short_string_multiple_steps: [missing] -> pass (J1)
  • runtest::tests::normalize_platform_differences: [missing] -> pass (J1)
  • tests::is_test_test: [missing] -> pass (J1)
  • tests::test_extract_gdb_version: [missing] -> pass (J1)
  • util::tests::path_buf_with_extra_extension_test: [missing] -> pass (J1)
  • core::builder::tests::snapshot::check_compiletest_stage1_libtest: pass -> [missing] (J5)
  • core::builder::tests::snapshot::test_compiletest_self_test: [missing] -> pass (J5)

Stage 1

  • [crashes] tests/crashes/129095.rs: pass -> [missing] (J0)
  • [crashes] tests/crashes/134654.rs: pass -> [missing] (J0)
  • [crashes] tests/crashes/136381.rs: pass -> [missing] (J0)
  • [ui] tests/ui/keyword/soup.rs: [missing] -> pass (J0)
  • [ui] tests/ui/privacy/ctor-not-accessible-due-to-inaccessible-field-in-reexport.rs: [missing] -> pass (J0)
  • directives::tests::asm_support: pass -> [missing] (J1)
  • directives::tests::channel: pass -> [missing] (J1)
  • directives::tests::cross_compile: pass -> [missing] (J1)
  • directives::tests::debugger: pass -> [missing] (J1)
  • directives::tests::families: pass -> [missing] (J1)
  • directives::tests::ignore_target: pass -> [missing] (J1)
  • directives::tests::llvm_version: pass -> [missing] (J1)
  • directives::tests::matches_env: pass -> [missing] (J1)
  • directives::tests::pointer_width: pass -> [missing] (J1)
  • directives::tests::profiler_runtime: pass -> [missing] (J1)
  • directives::tests::revisions: pass -> [missing] (J1)
  • directives::tests::rustc_debug_assertions: pass -> [missing] (J1)
  • directives::tests::sanitizers: pass -> [missing] (J1)
  • directives::tests::should_fail: pass -> [missing] (J1)
  • directives::tests::std_debug_assertions: pass -> [missing] (J1)
  • directives::tests::test_assembly_mode_forbidden_revisions: pass -> [missing] (J1)
  • directives::tests::test_extract_llvm_version: pass -> [missing] (J1)
  • directives::tests::test_extract_version_range: pass -> [missing] (J1)
  • directives::tests::test_forbidden_revisions_allowed_in_non_filecheck_dir: pass -> [missing] (J1)
  • directives::tests::test_ignore_auxiliary: pass -> [missing] (J1)
  • directives::tests::test_known_directive_check_no_error: pass -> [missing] (J1)
  • directives::tests::test_llvm_version_invalid_components: pass -> [missing] (J1)
  • directives::tests::test_llvm_version_invalid_prefix: pass -> [missing] (J1)
  • directives::tests::test_llvm_version_too_many_components: pass -> [missing] (J1)
  • directives::tests::test_miropt_mode_forbidden_revisions: pass -> [missing] (J1)
  • directives::tests::test_needs_target_has_atomic: pass -> [missing] (J1)
  • directives::tests::test_not_trailing_directive: pass -> [missing] (J1)
  • directives::tests::test_parse_normalize_rule: pass -> [missing] (J1)
  • directives::tests::test_rustc_abi: pass -> [missing] (J1)
  • directives::tests::test_supported_crate_types: pass -> [missing] (J1)
  • directives::tests::test_trailing_directive: pass -> [missing] (J1)
  • directives::tests::test_trailing_directive_with_comment: pass -> [missing] (J1)
  • directives::tests::threads_support: pass -> [missing] (J1)
  • directives::tests::wasm_special: pass -> [missing] (J1)
  • read2::tests::test_abbreviate_filters_can_still_cause_abbreviations: pass -> [missing] (J1)
  • tests::is_test_test: pass -> [missing] (J1)
  • tests::string_enums: pass -> [missing] (J1)
  • tests::test_extract_gdb_version: pass -> [missing] (J1)

Stage 2

  • [crashes] tests/crashes/129095.rs: pass -> [missing] (J2)
  • [crashes] tests/crashes/136381.rs: pass -> [missing] (J2)
  • [crashes] tests/crashes/137468.rs: pass -> [missing] (J2)
  • [crashes] tests/crashes/125772.rs: ignore (only executed when the architecture is x86_64) -> ignore (only executed when the pointer width is 64bit) (J3)
  • [crashes] tests/crashes/34127.rs: ignore (only executed when the architecture is x86_64) -> ignore (only executed when the pointer width is 64bit) (J3)
  • [crashes] tests/crashes/134654.rs: pass -> [missing] (J4)
  • [crashes] tests/crashes/135570.rs: pass -> [missing] (J4)
  • [ui] tests/ui/keyword/soup.rs: [missing] -> pass (J6)
  • [ui] tests/ui/privacy/ctor-not-accessible-due-to-inaccessible-field-in-reexport.rs: [missing] -> pass (J6)
  • [crashes] tests/crashes/125772.rs: ignore (only executed when the architecture is x86_64) -> pass (J7)
  • [crashes] tests/crashes/34127.rs: ignore (only executed when the architecture is x86_64) -> pass (J7)
  • [crashes] tests/crashes/135570.rs: ignore (only executed when the architecture is x86_64) -> [missing] (J8)

(and 55 additional test diffs)

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 7af913fc90968844286e5ff6675ab66afa98cdc6 --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. i686-gnu-nopt-2: 13369.6s -> 7891.8s (-41.0%)
  2. dist-aarch64-msvc: 6208.5s -> 5306.2s (-14.5%)
  3. x86_64-gnu-distcheck: 7710.4s -> 6723.7s (-12.8%)
  4. dist-x86_64-apple: 7425.5s -> 8364.6s (12.6%)
  5. dist-apple-various: 3734.1s -> 3273.6s (-12.3%)
  6. i686-gnu-nopt-1: 7754.3s -> 8622.9s (11.2%)
  7. i686-gnu-2: 6127.5s -> 5443.7s (-11.2%)
  8. pr-check-2: 2485.5s -> 2252.9s (-9.4%)
  9. pr-check-1: 1616.3s -> 1466.9s (-9.2%)
  10. x86_64-msvc-ext2: 5316.6s -> 5780.7s (8.7%)
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.

@Zalathar
Zalathar deleted the rollup-rtnqek7 branch September 29, 2025 08:52
@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (7af913f): comparison URL.

Overall result: ❌ regressions - 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-triaged to 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-performance working 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.

meanrangecount
Regressions ❌
(primary)
0.2%[0.1%, 0.3%]6
Regressions ❌
(secondary)
0.2%[0.0%, 0.4%]2
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)0.2%[0.1%, 0.3%]6

Max RSS (memory usage)

Results (primary 2.6%, secondary -0.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

meanrangecount
Regressions ❌
(primary)
2.6%[2.6%, 2.6%]1
Regressions ❌
(secondary)
1.1%[1.1%, 1.1%]1
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-2.7%[-2.7%, -2.7%]1
All ❌✅ (primary)2.6%[2.6%, 2.6%]1

Cycles

Results (primary -4.2%, secondary -1.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
-4.2%[-4.2%, -4.2%]1
Improvements ✅
(secondary)
-1.4%[-1.4%, -1.4%]2
All ❌✅ (primary)-4.2%[-4.2%, -4.2%]1

Binary size

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

Bootstrap: 469.945s -> 469.301s (-0.14%)
Artifact size: 387.67 MiB -> 387.67 MiB (0.00%)

@panstromek

Copy link
Copy Markdown
Contributor

perf triage:

Based on perf runs on respective PRs, this seems to be #133477. #147092 was tested but regressions on that are noise and don't match this PR. Other PR's don't touch benchmarked code.

This could also be noise, since the results somewhat fit a bimodal pattern and changes are tiny, but detailed results show increases in number of executed visibility related queries.

I left a comment on #133477

@rustbot label: +perf-regression-triaged

@rustbotrustbot added the perf-regression-triaged The performance regression has been triaged. label Oct 6, 2025
github-actionsBot pushed a commit to model-checking/verify-rust-std that referenced this pull request Oct 9, 2025
Rollup of 7 pull requests
Successful merges:
- rust-lang#133477 (Detect tuple structs that are unconstructable due to re-export)
- rust-lang#146929 (compiletest: Remove old-output-capture and become a stage0 bootstrap tool)
- rust-lang#146979 (constify Default on Nanoseconds)
- rust-lang#147092 (Do not compute optimized MIR if code does not type-check.)
- rust-lang#147112 (all 48 keywords in just 300 characters)
- rust-lang#147122 (Fix some crash-test directives)
- rust-lang#147127 (Add a leading dash to linker plugin arguments in the gcc codegen)
r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletestArea: The compiletest test runnerA-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-testsuiteArea: The testsuite used to check the correctness of rustcmerged-by-borsThis PR was explicitly merged by bors.perf-regressionPerformance regression.perf-regression-triagedThe performance regression has been triaged.rollupA PR which is a rollupS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant 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

@Zalathar@bors@rust-timer@panstromek@rustbot@npmccallum@nik-rev@cjgillot@antoyo@estebank