Skip to content

Rollup of 21 pull requests#157583

Closed
jhpratt wants to merge 54 commits into
rust-lang:mainfrom
jhpratt:rollup-PM67ztk
Closed

Rollup of 21 pull requests#157583
jhpratt wants to merge 54 commits into
rust-lang:mainfrom
jhpratt:rollup-PM67ztk

Conversation

@jhpratt
Copy link
Copy Markdown
Member

@jhpratt jhpratt commented Jun 7, 2026

Successful merges:

r? @ghost

Create a similar rollup

Kmeakin and others added 30 commits May 4, 2026 00:11
We can shave a further 2 `icmp`s by inlining `is_char_boundary` and rearranging
the checks.
Add notes to the primitive integer and `NonZero` types clarifying the
equivalence between `highest_one` and the `ilog2`/`checked_ilog2`
methods for non-negative values.
- 调整 MaybeUninit::zeroed 文档中的 padding 字节说明

- 对齐 mem::zeroed 中不保证 padding 为零的表述
…ning

Make the linker quiet by default and add linker command line arguments
for explicit verbosity control:

- no flag: no tracing output is emitted during successful links
- `-v`: emit informational linker diagnostics
- `-vv`: emit tracing-level linker diagnostics

Also adjust the tracing formatter to produce linker-style output by disabling
ANSI color sequences and omitting timestamps, tracing levels, and tracing
targets.
* The documentation for `align_of_val()` and `Alignment::of_val()` did
  not explain its use in interacting with `dyn` types, and even
  contained the false statement that “Every reference to a value of the
  type `T` must be a multiple of this number”. This change removes that
  statement from everything except `align_of()`, and adds a mention
  of, and example code for, getting the alignment of a `dyn` value.

* The documentation for `align_of_val_raw()` did not explain how it
  relates to other functions in the family. Now it does.

* Added a caveat that the alignment of `i32` is not always 4, despite
  the examples asserting this.
Import resolution now happens in 2 phases:
1. We resolve all undetermined and collect their resolutions
2. Write all resolutions to the Resolver state.

Repeat this untill we reach a fix point.

+ Bless tests
… imports the correct traits for `aarch64`.

+ run the generator to apply change.
- take ownership of the `Vec<&Impl>` instead of copying into another alloc
- reuse `ImplString` to do natural sort ordering
- lazy formatting
jhpratt added 4 commits June 7, 2026 14:38
Improve documentation of `align_of` and `Alignment`.

* The documentation for `align_of_val()` and `Alignment::of_val()` did not explain its use in interacting with `dyn` types, and even contained the false statement that “Every reference to a value of the type `T` must be a multiple of this number”. This change removes that statement from everything except `align_of()`, and adds a mention of, and example code for, getting the alignment of a `dyn` value.

* The documentation for `align_of_val_raw()` did not explain how it relates to other functions in the family. Now it does.

* Added a caveat that the alignment of `i32` is not always 4, despite the examples asserting this.

@rustbot label A-docs
…anBrouwer

Suggest using comma to separate valid attribute list items

If the parser encounters a missing comma in an attribute arg list and the next item is valid, suggest adding the comma.

For example:
```
error: attribute items not separated with `,`
  --> $DIR/expected-comma-found-token.rs:7:26
   |
LL |     message="the message"
   |                          ^ help: try adding `,` here
```
chore: Update annotate-snippets to 0.12.16

This PR updates `annotate-snippets` to [`0.12.16`](https://github.com/rust-lang/annotate-snippets-rs/blob/main/CHANGELOG.md#01216---2026-05-06) which fixes highlighting for indented code: rust-lang/annotate-snippets-rs#405

Also fixes rust-lang#155873 (the same problem)
…saethlin

In `copy_nonoverlapping`, use `mul nuw nsw` to compute the byte size

Seems like we might as well?  Adding these flags means the optimizer can tell the limited range on the count of items -- like how we use these flags (rust-lang#136575) when calculating `size_of_val` for a slice.

Today we use a wrapping multiplication, which mean that `copy_nonoverlapping::<u32>(src, dst, 0x40000000_00000001)` appears like 4 bytes -- a perfectly reasonable size! -- once it gets to the `memcpy` call.

If I'm understanding <https://doc.rust-lang.org/std/ptr/fn.copy_nonoverlapping.html#safety> properly, this is just exploiting existing UB, since `src` and `dst` must each be inside an allocation, and those allocations can be at most `isize::MAX` bytes.  (Plus, fundamentally, to be non-overlapping there's not enough space in the address space to be bigger than `isize::MAX`.)

cc @RalfJung to make sure this is ok, as requested last he found out I was newly exploiting some UB in codegen 🙃
r? codegen
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jun 7, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-CI Area: Our Github Actions CI A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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-rust-analyzer Relevant to the rust-analyzer 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. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. labels Jun 7, 2026
@jhpratt
Copy link
Copy Markdown
Member Author

jhpratt commented Jun 7, 2026

@bors r+ rollup=never p=5

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 7, 2026

📌 Commit 9387f83 has been approved by jhpratt

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Jun 7, 2026
@jhpratt jhpratt closed this Jun 7, 2026
@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 7, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 7, 2026

This pull request was unapproved due to being closed.

@jhpratt jhpratt deleted the rollup-PM67ztk branch June 7, 2026 18:40
@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web) (plain enhanced) (plain)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-CI Area: Our Github Actions CI A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-rustdoc-json Area: Rustdoc JSON backend rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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-rust-analyzer Relevant to the rust-analyzer 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. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.