Skip to content

Rollup of 17 pull requests - #159281

Closed
JonathanBrouwer wants to merge 41 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-qr1R3ex
Closed

Rollup of 17 pull requests#159281
JonathanBrouwer wants to merge 41 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-qr1R3ex

Conversation

@JonathanBrouwer

@JonathanBrouwerJonathanBrouwer commented Jul 14, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

nnethercoteand others added 30 commits July 12, 2026 10:57
Because that's what it is: any type with tokens must also have attrs.
This simplifies some trait bounds.
…ctions
When a const function drops a value whose type is a type parameter,
suggest adding a `[const] Destruct` bound so the destructor can be
evaluated at compile-time.
The suggested bound requires the unstable `const_destruct` feature,
so it is not actionable on a stable compiler.
Add a run-make test that verifies the suggestion is only emitted on nightly.
This way codegen backends don't have to check for a magic symbol name
prefix to detect LLVM intrinsic calls and thus can more easily handle
them separately as necessary.
Signed-off-by: Amirhossein Akhlaghpour <m9.akhlaghpoor@gmail.com>
This optimisation is currently broken on s390x[^1].
It looks like a big-endian issue in general. but as
we only know about the test fails on s390x we only
disable it there.
Should be reenabled when the problem is fixed and llvm
backend is updated.
[^1]: llvm/llvm-project#208712
This function's name is referring to `Step::make_run`, and has nothing to do
with run-make tests.
This was a reminder to make the lint translatable, but the code to make lints translatable has since been removed
Comptime inherent impls
A fairly trivial addition to comptime. Now that we have inherent methods that can individually be `#[rustc_comptime]`, we can just extend that to inherent impls.
lots of new test coverage as the attribute (even if it errors due to being illegal there) affects how the items it's applied to behave.
r? @fee1-dead
…, r=jdonszelmann
rerun in original typing mode if we meet any opaques in post analysis
When the rerun condition is `OpaqueInStorage` and typing mode is `PostAnalysis/Codegen`, we do rerun the evaluation in original typing mode.
It's strange that we don't do the same when the rerun condition is `OpaqueInStorageOrAnyOpaqueHasInferAsHidden`.
This fixes an ICE when building `cargo` with the next solver.
r? @jdonszelmann
cc @lcnr
…petrochenkov
Make `HasTokens` a sub-trait of `HasAttrs`.
Because that's what it is: any type with tokens must also have attrs. This simplifies some trait bounds.
r? @petrochenkov
…RalfJung,folkertdev
Introduce InstanceKind::LlvmIntrinsic
This way codegen backends don't have to check for a magic symbol name prefix to detect LLVM intrinsic calls and thus can more easily handle them separately as necessary.
Suggest the `[const] Destruct` bound for type parameters in const functions when missing
When a const function drops a value whose type is a type parameter without a `[const] Destruct` bound, suggest adding it so that the destructor can be evaluated at compile-time.
Closesrust-lang#103270.
Example:
```rust
const fn f(_x: impl std::fmt::Debug) {}
```
Before:
```
error[E0493]: destructor of `impl std::fmt::Debug` cannot be evaluated at compile-time
--> $DIR/min_const_fn.rs:1:11
|
LL | const fn f(_x: impl std::fmt::Debug) {}
| ^^ - value is dropped here
| |
| the destructor for this type cannot be evaluated in constant functions
```
After:
```
error[E0493]: destructor of `impl std::fmt::Debug` cannot be evaluated at compile-time
--> $DIR/min_const_fn.rs:1:11
|
LL | const fn f(_x: impl std::fmt::Debug) {}
| ^^ - value is dropped here
| |
| the destructor for this type cannot be evaluated in constant functions
|
help: consider restricting opaque type `impl std::fmt::Debug` with unstable trait `Destruct`
|
LL | const fn f(_x: impl std::fmt::Debug + [const] Destruct) {}
| ++++++++++++++++++
```
No new tests as the existing ones had their results updated with the new suggestion.
…-unchecked, r=jhpratt
slice: make swap delegate to swap_unchecked
It had duplicate unsafe code that already existed in swap_unchecked. So I just made swap call swap_unchecked instead of copying the same logic twice.
…jieyouxu
bootstrap: Rename `std_crates_for_run_make` to `std_crates_for_make_run`
This function's name is referring to `Step::make_run`, and has nothing to do with run-make tests.
(I was getting jump-scared every time I saw it!)
r? jieyouxu (or bootstrap)
remove obsolete comment
This was a reminder to make the lint translatable, but the code to make lints translatable has since been removed
…nszelmann
Construct `tokens` for attrs made by `mk_attr_word` and other variants
Fixesrust-lang#159261
`tokens` won't be constructed for generated built-in attrs before, so that after rust-lang#158854, `#[rustc_test_entrypoint_marker]` without `tokens` would be added when expanding `#[test]`. Then later expansions would cause the ICE when they wanna get the attr's `tokens`.
This PR makes `tokens` constructed for such attrs, although this specific ICE only need editing `mk_attr_word`, but I think it would be good to also edit `mk_attr_nested_word` and `mk_attr_name_value_str`.
@rust-borsrust-borsBot added the rollup A PR which is a rollup label Jul 14, 2026
@rustbotrustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jul 14, 2026
@JonathanBrouwer

Copy link
Copy Markdown
MemberAuthor

@bors r+ rollup=never p=5

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple,x86_64-mingw-1,i686-msvc-*

@rust-bors

rust-borsBot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

📌 Commit c3cd1da has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-borsrust-borsBot 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 14, 2026
@rust-bors

This comment has been minimized.

rust-borsBot pushed a commit that referenced this pull request Jul 14, 2026
Rollup of 17 pull requests
try-job: dist-various-1
try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple
try-job: x86_64-mingw-1
try-job: i686-msvc-*
@JonathanBrouwer

Copy link
Copy Markdown
MemberAuthor

@bors p=7
Scheduling

@rust-borsrust-borsBot 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 Jul 14, 2026
@rust-borsrust-borsBot closed this Jul 14, 2026
@rust-bors

rust-borsBot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

PR #159239, which is a member of this rollup, changed its commit SHA.

This rollup was thus unapproved due to being closed.

@rustbotrustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jul 14, 2026
@rust-borsrust-borsBot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jul 14, 2026
@rust-bors

rust-borsBot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 6218ef9 failed: CI

@JonathanBrouwer
JonathanBrouwer deleted the rollup-qr1R3ex branch August 21, 2026 08:28
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributesArea: Attributes (`#[…]`, `#![…]`)A-run-makeArea: port run-make Makefiles to rmake.rsA-testsuiteArea: The testsuite used to check the correctness of rustcA-tidyArea: The tidy toolrollupA PR which is a rollupS-waiting-on-authorStatus: This is awaiting some action (such as code changes or more information) from the author.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.WG-trait-system-refactorThe Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

18 participants

@JonathanBrouwer@rustbot@nnethercote@jakubadamw@bjorn3@Joel-Wwalker@amirHdev@vilgotf@Kobzol@estebank@xonx4l@oli-obk@fneddy@Rachit2323@Zalathar@tshepang@mu001999@adwinwhite