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

Open
wants to merge 28 commits into
base: master
Choose a base branch
from

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
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
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.
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
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
…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
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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 18, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Jul 18, 2025

📌 Commit a59efc6 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 18, 2025
bors added a commit that referenced this pull request Jul 18, 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 18, 2025

⌛ Testing commit a59efc6 with merge 6dfabf3...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) 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.