Skip to content

Rollup of 9 pull requests #144145

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 28 commits into from
Jul 19, 2025
Merged

Rollup of 9 pull requests #144145

merged 28 commits into from
Jul 19, 2025

Conversation

matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Jul 18, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

fee1-dead and others added 28 commits July 3, 2025 23:39
Only relevant to the internal feature `more_maybe_bounds`.
We no longer move trait predicates where the self ty is a ty param to
"the bounds of a ty param".
adds command line option for disabling llvm builds. it's useful in case of user having their own
optimized LLVM, so they won't waste time for (at least) 3 LLVM builds. in this case PGO optimized
will be already built in Stage 1, so my previous PR should be addressed for this change
* The phrasing "only does something for" made sense back when this
  diagnostic was a (hard) warning. Now however, it's simply a hard
  error and thus completely rules out "doing something".
* The primary message was way too long
* The new wording more closely mirrors the wording we use for applying
  other bound modifiers (like `const` and `async`) to incompatible
  traits.
* "all other traits are not bound by default" is no longer accurate
  under Sized Hierarchy. E.g., traits and assoc tys are (currently)
  bounded by `MetaSized` by default but can't be relaxed using
  `?MetaSized` (instead, you relax it by adding `PointeeSized`).
* I've decided against adding any diagnositic notes or suggestions
  for now like "trait `Trait` can't be relaxed as it's not bound by
  default" which would be incorrect for `MetaSized` and assoc tys
  as mentioned above) or "consider changing `?MetaSized` to
  `PointeeSized`" as the Sized Hierarchy impl is still WIP)
Having multiple relaxed bounds like `?Sized + ?Iterator` is actually *fine*.
We actually want to reject *duplicate* relaxed bounds like `?Sized + ?Sized`
because these most certainly represent a user error.

Note that this doesn't mean that we accept more code because a bound like
`?Iterator` is still invalid as it's not relaxing a *default* trait and
the only way to define / use more default bounds is under the experimental
and internal feature `more_maybe_bounds` plus `lang_items` plus unstable
flag `-Zexperimental-default-bounds` (historical context: for the longest
time, bounds like `?Iterator` were actually allowed and lead to a hard
warning).

Ultimately, this simply *reframes* the diagnostic. The scope of
`more_maybe_bounds` / `-Zexperimental-default-bounds` remains unchanged
as well.
Distinguish delim kind to decide whether to emit unexpected closing delimiter

Fixes rust-lang#138401
Show the offset, length and memory of uninit read errors

r? ``@RalfJung``

I want to improve memory dumps in general. Not sure yet how to do so best within rust diagnostics, but in a perfect world I could generate a dummy in-memory file (that contains the rendered memory dump) that we then can then provide regular rustc `Span`s to. So we'd basically report normal diagnostics for them with squiggly lines and everything.
…er-errors

More robustly deal with relaxed bounds and improve their diagnostics

Scaffolding for rust-lang#135229 (CC rust-lang#135331)

Fixes rust-lang#136944 (6th commit).
Fixes rust-lang#142718 (8th commit).
…z, r=jhpratt

stabilize `const_slice_reverse`

cc rust-lang#135120, needs FCP.
opt-dist: make llvm builds optional

adds command line option for disabling llvm builds. it's useful in case of user having their own optimized LLVM, so they won't waste time for (at least) 3 LLVM builds. in this case PGO optimized rustc will be already built in Stage 1, so rust-lang#143898 should be addressed for this change

couldn't test locally on Linux laptop due to small SSD storage, will try now with windows-msvc host

r? ``@Kobzol``

try-job: dist-x86_64-linux
try-job: dist-x86_64-msvc
…, r=rcvalle

Correct which exploit mitigations are enabled by default

This was brought up by ``@Noratrieb`` in [#project-exploit-mitigations > Incorrect table in the rustc book](https://rust-lang.zulipchat.com/#narrow/channel/343119-project-exploit-mitigations/topic/Incorrect.20table.20in.20the.20rustc.20book/with/523684203). Thanks! :)

[Rendered](https://github.com/rust-lang/rust/blob/132a47e72316b60e99c3e5fefb9c3a06641138e4/src/doc/rustc/src/exploit-mitigations.md)

r? ``@rcvalle``
…rt, r=jdonszelmann

Fix encoding of link_section and no_mangle cross crate

Fixes rust-lang#144004

``@bjorn3`` suggested using the `codegen_fn_attrs` query but given that these attributes are not that common it's probably fine to just always encode them. I can also go for that solution if it is preferred but that would require more changes.

r? ``@jdonszelmann`` ``@fmease`` (whoever feels like it)
…er, r=petrochenkov

Refactor `CrateLoader` into the `CStore`

Removes the `CrateLoader` and moves the code to `CStore`. Now, if you want to use the `CrateLoader`, you can just use `CStore`.

Should we rename `creader.rs` to `cstore.rs`?

r? ``@petrochenkov``
Generalize `unsize` and `unsize_into` destinations

Just something that I noticed during other work. We do this for most such functions, so let's do it here, too.

r? ``@RalfJung``
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) PG-exploit-mitigations Project group: Exploit mitigations labels Jul 18, 2025
@bors
Copy link
Collaborator

bors commented Jul 18, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 18, 2025
@matthiaskrgr
Copy link
Member Author

@bors retry lost communication with the runner

@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 18, 2025
bors added a commit that referenced this pull request Jul 19, 2025
Rollup of 9 pull requests

Successful merges:

 - #138554 (Distinguish delim kind to decide whether to emit unexpected closing delimiter)
 - #142673 (Show the offset, length and memory of uninit read errors)
 - #142693 (More robustly deal with relaxed bounds and improve their diagnostics)
 - #143382 (stabilize `const_slice_reverse`)
 - #143928 (opt-dist: make llvm builds optional)
 - #143961 (Correct which exploit mitigations are enabled by default)
 - #144050 (Fix encoding of link_section and no_mangle cross crate)
 - #144059 (Refactor `CrateLoader` into the `CStore`)
 - #144123 (Generalize `unsize` and `unsize_into` destinations)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Collaborator

bors commented Jul 19, 2025

⌛ Testing commit a59efc6 with merge 2ff5cce...

@rust-log-analyzer
Copy link
Collaborator

The job i686-msvc-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
failures:

---- [ui] tests\ui\rust-2018\removing-extern-crate-malformed-cfg.rs stdout ----

thread '[ui] tests\ui\rust-2018\removing-extern-crate-malformed-cfg.rs' panicked at src\tools\compiletest\src\runtest.rs:1950:35:
failed to write D:\a\rust\rust\build\i686-pc-windows-msvc\test\ui\rust-2018\removing-extern-crate\auxiliary\dummy-crate\dummy-crate.out: Os { code: 3, kind: NotFound, message: "The system cannot find the path specified." }


failures:
    [ui] tests\ui\rust-2018\removing-extern-crate-malformed-cfg.rs

test result: FAILED. 19066 passed; 1 failed; 396 ignored; 0 measured; 21 filtered out; finished in 1215.18s

Some tests failed in compiletest suite=ui mode=ui host=i686-pc-windows-msvc target=i686-pc-windows-msvc
Build completed unsuccessfully in 1:38:38
make: *** [Makefile:112: ci-msvc-py] Error 1
  local time: Sat Jul 19 02:41:52 CUT 2025
  network time: Sat, 19 Jul 2025 02:41:53 GMT
##[error]Process completed with exit code 2.
Post job cleanup.
[command]"C:\Program Files\Git\bin\git.exe" version

@bors
Copy link
Collaborator

bors commented Jul 19, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 19, 2025
@matthiaskrgr
Copy link
Member Author

@bors retry

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

bors commented Jul 19, 2025

⌛ Testing commit a59efc6 with merge 1079c5e...

@bors
Copy link
Collaborator

bors commented Jul 19, 2025

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 1079c5e to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 19, 2025
@bors bors merged commit 1079c5e into rust-lang:master Jul 19, 2025
12 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 19, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#138554 Distinguish delim kind to decide whether to emit unexpected… a5d6b42bc066245140421426616d43d25b0c7852 (link)
#142673 Show the offset, length and memory of uninit read errors bf412f757da532bbde124038c4f6ba2652e93802 (link)
#142693 More robustly deal with relaxed bounds and improve their di… 0f5d4a507345bdf473aef783054b6ace787cac6d (link)
#143382 stabilize const_slice_reverse 942cb7715c2406483d87fd1e1c30514cd799c06d (link)
#143928 opt-dist: make llvm builds optional 8c10dc03739fe4a83c93aad2c7cbc01b6db67412 (link)
#143961 Correct which exploit mitigations are enabled by default 14e7e574628c50a702c4f6b908598afd17d00b5d (link)
#144050 Fix encoding of link_section and no_mangle cross crate cc3dceb7f65ed84f8b47941e37a29fa678932d26 (link)
#144059 Refactor CrateLoader into the CStore 939057b7e6df47268ddc9bf318e97412d76d1fec (link)
#144123 Generalize unsize and unsize_into destinations eb3b0647a0f47c8e13271fc566dda9d95a49b5f0 (link)

previous master: ebd8557637

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 ebd8557 (parent) -> 1079c5e (this PR)

Test differences

Show 335 test diffs

Stage 1

  • errors::verify_ast_lowering_arbitrary_expression_in_pattern_28: [missing] -> pass (J0)
  • errors::verify_ast_lowering_arbitrary_expression_in_pattern_29: pass -> [missing] (J0)
  • errors::verify_ast_lowering_async_bound_not_on_trait_31: [missing] -> pass (J0)
  • errors::verify_ast_lowering_async_bound_not_on_trait_32: pass -> [missing] (J0)
  • errors::verify_ast_lowering_async_bound_only_for_fn_traits_32: [missing] -> pass (J0)
  • errors::verify_ast_lowering_async_bound_only_for_fn_traits_33: pass -> [missing] (J0)
  • errors::verify_ast_lowering_generic_param_default_in_binder_30: [missing] -> pass (J0)
  • errors::verify_ast_lowering_generic_param_default_in_binder_31: pass -> [missing] (J0)
  • errors::verify_ast_lowering_inclusive_range_with_no_end_29: [missing] -> pass (J0)
  • errors::verify_ast_lowering_inclusive_range_with_no_end_30: pass -> [missing] (J0)
  • errors::verify_ast_lowering_match_arm_with_no_body_25: [missing] -> pass (J0)
  • errors::verify_ast_lowering_match_arm_with_no_body_26: pass -> [missing] (J0)
  • errors::verify_ast_lowering_misplaced_relax_trait_bound_25: pass -> [missing] (J0)
  • errors::verify_ast_lowering_never_pattern_with_body_26: [missing] -> pass (J0)
  • errors::verify_ast_lowering_never_pattern_with_body_27: pass -> [missing] (J0)
  • errors::verify_ast_lowering_never_pattern_with_guard_27: [missing] -> pass (J0)
  • errors::verify_ast_lowering_never_pattern_with_guard_28: pass -> [missing] (J0)
  • errors::verify_ast_lowering_no_precise_captures_on_apit_33: [missing] -> pass (J0)
  • errors::verify_ast_lowering_no_precise_captures_on_apit_34: pass -> [missing] (J0)
  • errors::verify_ast_lowering_union_default_field_values_35: [missing] -> pass (J0)
  • errors::verify_ast_lowering_union_default_field_values_36: pass -> [missing] (J0)
  • errors::verify_ast_lowering_yield_in_closure_34: [missing] -> pass (J0)
  • errors::verify_ast_lowering_yield_in_closure_35: pass -> [missing] (J0)
  • errors::verify_ast_passes_abi_cannot_be_coroutine_62: [missing] -> pass (J0)
  • errors::verify_ast_passes_abi_cannot_be_coroutine_64: pass -> [missing] (J0)
  • errors::verify_ast_passes_abi_custom_safe_foreign_function_60: [missing] -> pass (J0)
  • errors::verify_ast_passes_abi_custom_safe_foreign_function_62: pass -> [missing] (J0)
  • errors::verify_ast_passes_abi_custom_safe_function_61: [missing] -> pass (J0)
  • errors::verify_ast_passes_abi_custom_safe_function_63: pass -> [missing] (J0)
  • errors::verify_ast_passes_abi_must_not_have_parameters_or_return_type_63: [missing] -> pass (J0)
  • errors::verify_ast_passes_abi_must_not_have_parameters_or_return_type_65: pass -> [missing] (J0)
  • errors::verify_ast_passes_abi_must_not_have_return_type_64: [missing] -> pass (J0)
  • errors::verify_ast_passes_abi_must_not_have_return_type_66: pass -> [missing] (J0)
  • errors::verify_ast_passes_const_and_c_variadic_49: [missing] -> pass (J0)
  • errors::verify_ast_passes_const_and_c_variadic_51: pass -> [missing] (J0)
  • errors::verify_ast_passes_const_and_coroutine_48: [missing] -> pass (J0)
  • errors::verify_ast_passes_const_and_coroutine_50: pass -> [missing] (J0)
  • errors::verify_ast_passes_const_bound_trait_object_47: [missing] -> pass (J0)
  • errors::verify_ast_passes_const_bound_trait_object_49: pass -> [missing] (J0)
  • errors::verify_ast_passes_constraint_on_negative_bound_54: [missing] -> pass (J0)
  • errors::verify_ast_passes_constraint_on_negative_bound_56: pass -> [missing] (J0)
  • errors::verify_ast_passes_extern_without_abi_59: [missing] -> pass (J0)
  • errors::verify_ast_passes_extern_without_abi_61: pass -> [missing] (J0)
  • errors::verify_ast_passes_incompatible_features_52: [missing] -> pass (J0)
  • errors::verify_ast_passes_incompatible_features_54: pass -> [missing] (J0)
  • errors::verify_ast_passes_match_arm_with_no_body_56: [missing] -> pass (J0)
  • errors::verify_ast_passes_match_arm_with_no_body_58: pass -> [missing] (J0)
  • errors::verify_ast_passes_negative_bound_not_supported_53: [missing] -> pass (J0)
  • errors::verify_ast_passes_negative_bound_not_supported_55: pass -> [missing] (J0)
  • errors::verify_ast_passes_negative_bound_with_parenthetical_notation_55: [missing] -> pass (J0)
  • errors::verify_ast_passes_negative_bound_with_parenthetical_notation_57: pass -> [missing] (J0)
  • errors::verify_ast_passes_optional_trait_object_48: pass -> [missing] (J0)
  • errors::verify_ast_passes_optional_trait_supertrait_47: pass -> [missing] (J0)
  • errors::verify_ast_passes_pattern_in_bodiless_51: [missing] -> pass (J0)
  • errors::verify_ast_passes_pattern_in_bodiless_53: pass -> [missing] (J0)
  • errors::verify_ast_passes_pattern_in_foreign_50: [missing] -> pass (J0)
  • errors::verify_ast_passes_pattern_in_foreign_52: pass -> [missing] (J0)
  • errors::verify_ast_passes_precise_capturing_duplicated_58: [missing] -> pass (J0)
  • errors::verify_ast_passes_precise_capturing_duplicated_60: pass -> [missing] (J0)
  • errors::verify_ast_passes_precise_capturing_not_allowed_here_57: [missing] -> pass (J0)
  • errors::verify_ast_passes_precise_capturing_not_allowed_here_59: pass -> [missing] (J0)
  • [rustdoc] tests/rustdoc/reexport/reexport-attrs.rs: [missing] -> pass (J2)
  • [ui] tests/ui/parser/issues/unnessary-error-issue-138401.rs: [missing] -> pass (J2)
  • [ui] tests/ui/sized-hierarchy/pointee-validation.rs: [missing] -> pass (J2)
  • [ui] tests/ui/trait-bounds/bad-suggestionf-for-repeated-unsized-bound-127441.rs: pass -> [missing] (J2)
  • [ui] tests/ui/trait-bounds/duplicate-relaxed-bounds.rs: [missing] -> pass (J2)
  • [ui] tests/ui/trait-bounds/fix-dyn-sized-fn-param-sugg.rs: [missing] -> pass (J2)
  • [ui] tests/ui/trait-bounds/more_maybe_bounds.rs: [missing] -> pass (J2)
  • [ui] tests/ui/traits/maybe-polarity-pass.rs: pass -> [missing] (J2)
  • [ui] tests/ui/traits/maybe-polarity-repeated.rs: pass -> [missing] (J2)
  • [ui] tests/ui/traits/maybe-trait-bounds-forbidden-locations.rs: pass -> [missing] (J2)
  • [ui] tests/ui/traits/wf-object/maybe-bound.rs: pass -> [missing] (J2)
  • [ui] tests/ui/unsized/maybe-bounds-where.rs: pass -> [missing] (J2)
  • [ui] tests/ui/unsized/relaxed-bounds-invalid-places.rs: [missing] -> pass (J2)

Stage 2

  • [ui] tests/ui/parser/issues/unnessary-error-issue-138401.rs: [missing] -> pass (J1)
  • [ui] tests/ui/sized-hierarchy/pointee-validation.rs: [missing] -> pass (J1)
  • [ui] tests/ui/trait-bounds/bad-suggestionf-for-repeated-unsized-bound-127441.rs: pass -> [missing] (J1)
  • [ui] tests/ui/trait-bounds/duplicate-relaxed-bounds.rs: [missing] -> pass (J1)
  • [ui] tests/ui/trait-bounds/fix-dyn-sized-fn-param-sugg.rs: [missing] -> pass (J1)
  • [ui] tests/ui/trait-bounds/more_maybe_bounds.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/maybe-polarity-pass.rs: pass -> [missing] (J1)
  • [ui] tests/ui/traits/maybe-polarity-repeated.rs: pass -> [missing] (J1)
  • [ui] tests/ui/traits/maybe-trait-bounds-forbidden-locations.rs: pass -> [missing] (J1)
  • [ui] tests/ui/traits/wf-object/maybe-bound.rs: pass -> [missing] (J1)
  • [ui] tests/ui/unsized/maybe-bounds-where.rs: pass -> [missing] (J1)
  • [ui] tests/ui/unsized/relaxed-bounds-invalid-places.rs: [missing] -> pass (J1)
  • [rustdoc] tests/rustdoc/reexport/reexport-attrs.rs: [missing] -> pass (J3)

Additionally, 248 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 1079c5edb2bd837e5c4cf8c7db2892db359a3862 --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: 3567.3s -> 5377.4s (50.7%)
  2. dist-aarch64-linux: 5897.7s -> 7905.0s (34.0%)
  3. x86_64-apple-1: 6410.2s -> 8526.4s (33.0%)
  4. dist-s390x-linux: 5762.3s -> 4858.8s (-15.7%)
  5. aarch64-apple: 4684.0s -> 4029.9s (-14.0%)
  6. dist-aarch64-apple: 5602.8s -> 5084.5s (-9.3%)
  7. test-various: 4637.2s -> 5035.7s (8.6%)
  8. dist-apple-various: 7456.6s -> 8069.8s (8.2%)
  9. dist-armv7-linux: 4871.0s -> 5224.2s (7.3%)
  10. dist-sparcv9-solaris: 4912.1s -> 5238.4s (6.6%)
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 (1079c5e): 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-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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.4% [0.5%, 2.8%] 9
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.1% [-0.3%, -0.0%] 2
All ❌✅ (primary) - - 0

Max RSS (memory usage)

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

Cycles

Results (primary 2.3%, secondary 6.4%)

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

mean range count
Regressions ❌
(primary)
2.3% [2.3%, 2.3%] 1
Regressions ❌
(secondary)
6.4% [6.4%, 6.4%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.3% [2.3%, 2.3%] 1

Binary size

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

Bootstrap: 465.449s -> 464.831s (-0.13%)
Artifact size: 374.66 MiB -> 374.62 MiB (-0.01%)

@rustbot rustbot added the perf-regression Performance regression. label Jul 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. PG-exploit-mitigations Project group: Exploit mitigations 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-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.