Rollup of 23 pull requests#157790
Closed
JonathanBrouwer wants to merge 67 commits into
Closed
Conversation
This also syncs `RUSTFLAGS: -D warnings` which is added in rust-lang/rustfmt
Replace uses of `u8` with a generic type. This will allow reusing `BorrowedBuf` elsewhere in the standard library, for purposes other than byte buffers. This currently requires `T: Copy`, to prevent `T: Drop`, which would require additional careful handling. We can consider relaxing that restriction in the future if we make `T: Drop` work (without pessimizing `Copy` types like `u8`). `ensure_init` currently continues to require `u8`. We could potentially generalize it to `T: Default`, but we'd need to ensure it produced the same or better assembly for `u8`.
This default simplified the commit making these types generic, but we don't actually want the default. Rewrite every user to specify `u8` explicitly.
Now that the `impl` block has a bound, the one on `append` became redundant.
An unconstrained `TransmuteFrom` obligation used to ICE with `layout_of: unexpected type` under the next-gen trait solver; it now reports `type annotations needed` (E0283). Add a regression test for that case, which the fix's own test suite did not cover.
This is an optimization to reduce the amount for paths that get added to the dylib search path. This is especially important for Windows as it has issues when PATH gets too long. With the new Cargo build-dir we increased the number of paths being passed.
When pointing at each step of cycle errors, do not include the code snippet when the note points at the same place as the previous one (by setting the note's span to DUMMY_SP).
Co-authored-by: Ryan Mehri <52933714+rmehri01@users.noreply.github.com>
This is effectively dead code now that we validate the target spec, so let's mark it as unreachable to avoid misleading people looking at this code.
Add support for inline assembly for the amdgpu backend (the amdgcn-amd-amdhsa target). Add register classes for `vgpr` (vector general purpose register) and `sgpr` (scalar general purpose register). The LLVM backend supports two more classes, `reg`, which is either VGPR or SGPR, up to the compiler to decide. As instructions often rely on a register being either a VGPR or SGPR for the assembly to be valid, reg doesn’t seem that useful (I struggled to write correct tests for it), so I didn’t end up adding it. The fourth register class is AGPRs, which only exist on some hardware versions (not the consumer ones) and they have restricted ways to write and read from them, which makes it hard to write a Rust variable into them. They could be used inside assembly blocks, but I didn’t add them as Rust register class. There are a few change affecting general inline assembly code, that is `InlineAsmReg::name()` now returns a `Cow` instead of a `&'static str`. Because amdgpu has many registers, 256 VGPRs plus combinations of 2 or 4 VGPRs, and I didn’t want to list hundreds of static strings, the amdgpu reg stores the register number(s) and a non-static String is generated at runtime for the register name. Similar for register classes and supported_types. Vectors of 64-bit types are supported by the LLVM backend, but omitted here to make the code simpler. There is currently no systematic support in LLVM of which vectors of 64-bit types are supported. Also, they are likely seldomly unused, vectors of 16- and 32-bit types are important.
A macro can expand to several missing-type items (e.g. a `$()*` repetition of `const A = ...;`) that all collide on one stashed `ItemNoType` diagnostic. They can infer different types, so there is no single concrete type to suggest, and which item wins the steal is not even stable under the parallel front-end. Skip the inferred-type suggestion when the placeholder span comes from a macro expansion and keep the generic `<type>` suggestion from the parser instead, mirroring the existing handling in the fallback arm. This makes the diagnostic deterministic, so the `in-macro` test no longer needs `ignore-parallel-frontend`.
Contributor
Author
|
@bors r+ rollup=never p=5 |
1 similar comment
Contributor
Author
|
@bors r+ rollup=never p=5 |
Contributor
Contributor
Author
|
Try jobs have completed in #157784 |
Contributor
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Jun 11, 2026
…uwer Rollup of 23 pull requests Successful merges: - #157716 (update Enzyme, June'26) - #149793 (Add inline asm support for amdgpu) - #155299 (make repr_transparent_non_zst_fields a hard error) - #155439 (Enable Cargo's new build-dir layout) - #157612 (Add a test where subtyping inhibits coercion.) - #157626 (Autogenerate unstable compiler flag stubs for unstable-book) - #157667 (Rename typing modes to better describe real usage) - #149749 (Make `BorrowedBuf` and `BorrowedCursor` generic over the data) - #156212 (Additionally gate negative bounds behind new `-Zinternal-testing-features`) - #157342 (Reduce verbosity of cycle errors when possible) - #157366 (Add a regression test for an unconstrained TransmuteFrom ICE) - #157459 (rustc_target: callconv: powerpc64: Remove unreachable fallback code path) - #157658 (UnsafeCell: mention shared-ref-to-interior case, fix aliasing model inaccuracy) - #157698 (Remove an unnecessary cloning) - #157699 (Arg splat experiment - hir FnDecl impl) - #157713 (resolve: Remove exported imports from `maybe_unused_trait_imports`) - #157722 (Move create_scope_map to rustc_codegen_ssa.) - #157725 (Keep generic suggestion for macro-expanded missing-type items) - #157733 (Remove old FIXMEs about nocapture attribute) - #157737 (Reorganize `tests/ui/issues` [7/N]) - #157746 (supports_c_variadic_definitions: extend checklist for new targets) - #157763 (Move unused target expression error to appropriate place and rename it) - #157768 (codegen_ssa: peel trans. wrappers on scalable vecs)
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
💔 Test for 88446ba failed: CI. Failed job:
|
Contributor
|
PR #155439, which is a member of this rollup, was unapproved. |
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:
BorrowedBufandBorrowedCursorgeneric over the data #149749 (MakeBorrowedBufandBorrowedCursorgeneric over the data)-Zinternal-testing-features#156212 (Additionally gate negative bounds behind new-Zinternal-testing-features)maybe_unused_trait_imports#157713 (resolve: Remove exported imports frommaybe_unused_trait_imports)tests/ui/issues[7/N] #157737 (Reorganizetests/ui/issues[7/N])r? @ghost
Create a similar rollup