Rollup of 21 pull requests#157583
Closed
jhpratt wants to merge 54 commits into
Closed
Conversation
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
…ic write_all_vectored
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
Member
Author
|
@bors r+ rollup=never p=5 |
Contributor
Contributor
|
This pull request was unapproved due to being closed. |
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
SliceIndex<str>impl forRange<usize>#156119 (Further optimizeSliceIndex<str>impl forRange<usize>)render_impls#157540 (Cleanup and optimizerender_impls)tests/ui/issues[5/N] #157543 (Reorganizetests/ui/issues[5/N])highest_oneandilog2methods on integers #157078 (Document equivalence ofhighest_oneandilog2methods on integers)integer_casts#157402 (Implement featureinteger_casts)align_ofandAlignment. #157500 (Improve documentation ofalign_ofandAlignment.)copy_nonoverlapping, usemul nuw nswto compute the byte size #157560 (Incopy_nonoverlapping, usemul nuw nswto compute the byte size)r? @ghost
Create a similar rollup