Skip to content

Rollup of 11 pull requests#157569

Closed
JonathanBrouwer wants to merge 31 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-NyAZAOc
Closed

Rollup of 11 pull requests#157569
JonathanBrouwer wants to merge 31 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-NyAZAOc

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

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.
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
This is an UnordMap internally. Iteration order for the work product map
should not matter aside from the place it is serialized where sorting by
WorkProductId is sufficient.
It was already only called when incr comp is enabled and this allows
cleaning up the callers a bit.
…rate, r=jieyouxu

Move cross crate tests into the appropriate folder

Hi, I've returned with a few more reorganized tests.
r? @jieyouxu
This is part of [133895](rust-lang#133895)

try-job: armhf-gnu
…solution, r=petrochenkov

Resolver: Batched Import Resolution

*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/145108)*

Transforms the current algorithm for resolving imports to a batched algorithm. Every import in the `indeterminate_imports` set is resolved in isolation. This is the only real difference from the current algorithm.

r? petrochenkov
…ark-Simulacrum

Further optimize `SliceIndex<str>` impl for `Range<usize>`

We can shave a further 2 `icmp`s by inlining `is_char_boundary` and rearranging the checks.

Follow up to rust-lang#145024
…eyouxu

Add infallible primitive type lookups to template arg resolver

Fixes a regression that seem to come from LLDB 22 where looking up primitive types by name on MSVC no longer works. Container types use type name lookups to resolve generics, so it causes container types (e.g. `Vec<i32>`) to fail to create their child values.

Before:

```
(lldb) v vec_v
(alloc::vec::Vec<i32,alloc::alloc::Global>) vec_v = size=5 {}
(lldb) v vec_v[0]
error: <user expression 0>:1:6: array index 0 is not valid for "(Vec<i32,alloc::alloc::Global>) vec_v"
   1 | vec_v[0]
     | ^
```

After:

```
(lldb) v vec_v
(alloc::vec::Vec<i32,alloc::alloc::Global>) vec_v = size=5 {
  [0] = 10
  [1] = 20
  [2] = 30
  [3] = 40
  [4] = 50
}
(lldb) v vec_v[0]
(long) vec_v[0] = 10
```

This patch maps the type name to its `eBasicType` equivalent (i.e. the LLDB enum for primitive types) and looks up the type based on that. AFAIK, `eBasicType` lookups are 100% infallible. Even if the primitive type somehow isn't in the debug info, `TypeSystemClang` will invent the appropriate `SBType` object for it.

This isn't a major blocker for the test suite rework, but it does prevent me from blessing tests with container types on MSVC unless I downgrade to LLDB 21.

r? @jieyouxu, @Kobzol
…pls-cleanup, r=GuillaumeGomez

Cleanup and optimize `render_impls`

- take ownership of the `Vec<&Impl>` instead of copying into another alloc
- reuse `ImplString` to do natural sort ordering
- lazy formatting

Somewhat of a follow-up to rust-lang#157233 and rust-lang#157179 (cc @nnethercote - thanks!)
This kinda undoes rust-lang@f7c8bc2 but IMHO it makes more sense to be explicit about negative impl ordering, and also seems kinda wasteful to "render" the negativity into a string and rely on however ASCII decided to order characters. I can also undo this part, I think this PR is still a positive change even without it.

r? @GuillaumeGomez

LLM disclosure:
I used LLM for reviewing my changes and making sure some assumptions I was making were correct (i.e. that `render_impls` will not render anything IFF the list of traits passed to it is empty)
…-cfg-stable-toggle-unstable, r=RalfJung

riscv: promote d, e, and f target_features to CfgStableToggleUnstable

Reference PR:

- rust-lang/reference#2274

This PR is a continuation of rust-lang#155962

It uses the new `CfgStableToggleUnstable` stability level for the `"d"`, `"e"`, and `"f"` `target_features` of RISC-V. This way, it will be possible to add conditional code blocks depending on whether the target architecture has FPU, for instance.

The PR is related to rust-lang#150257

r? @RalfJung
… r=jhpratt

Document Repeat::last panic behavior

Fixes rust-lang#149707

Documents that `Repeat::last` always panics because `Repeat` is infinite.

Tests:
- `./x fmt --check`
- `./x doc library/core`
- `./x test library/core`
…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)
@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-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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-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. labels Jun 7, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@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-2

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 7, 2026

📌 Commit b3d7e2c has been approved by JonathanBrouwer

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
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 7, 2026

⌛ Trying commit b3d7e2c with merge dba3d97

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/27091640878

rust-bors Bot pushed a commit that referenced this pull request Jun 7, 2026
Rollup of 11 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-2
@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

PR #157444, which is a member of this rollup, was unapproved.

This rollup was thus unapproved.

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 7, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors try cancel

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 7, 2026

Try build cancelled. Cancelled workflows:

@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

The job aarch64-gnu-llvm-21-1 failed! Check out the build log: (web) (plain enhanced) (plain)

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

---- [ui] tests/ui-fulldeps/codegen-backend/hotplug.rs#normal stdout ----

error in revision `normal`: auxiliary build of /checkout/tests/ui-fulldeps/codegen-backend/auxiliary/the_backend.rs failed to compile: 
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui-fulldeps/codegen-backend/auxiliary/the_backend.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--cfg" "normal" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui-fulldeps/codegen-backend/hotplug.normal/auxiliary" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "--edition=2021" "--crate-type" "dylib" "-L" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui-fulldeps/codegen-backend/hotplug.normal/auxiliary"
stdout: none
--- stderr -------------------------------
error: unused imports: `WorkProductId` and `WorkProduct`
##[error]  --> /checkout/tests/ui-fulldeps/codegen-backend/auxiliary/the_backend.rs:17:31
   |
LL | use rustc_middle::dep_graph::{WorkProduct, WorkProductId, WorkProductMap};
   |                               ^^^^^^^^^^^  ^^^^^^^^^^^^^
   |
note: the lint level is defined here
  --> /checkout/tests/ui-fulldeps/codegen-backend/auxiliary/the_backend.rs:4:9
   |
---

---- [ui] tests/ui-fulldeps/codegen-backend/hotplug.rs#normal stdout end ----
---- [ui] tests/ui-fulldeps/codegen-backend/hotplug.rs#bindep stdout ----

error in revision `bindep`: auxiliary build of /checkout/tests/ui-fulldeps/codegen-backend/auxiliary/the_backend.rs failed to compile: 
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui-fulldeps/codegen-backend/auxiliary/the_backend.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--cfg" "bindep" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui-fulldeps/codegen-backend/hotplug.bindep/auxiliary" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "--edition=2021" "--crate-type" "dylib" "-L" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui-fulldeps/codegen-backend/hotplug.bindep/auxiliary"
stdout: none
--- stderr -------------------------------
error: unused imports: `WorkProductId` and `WorkProduct`
##[error]  --> /checkout/tests/ui-fulldeps/codegen-backend/auxiliary/the_backend.rs:17:31
   |
LL | use rustc_middle::dep_graph::{WorkProduct, WorkProductId, WorkProductMap};
   |                               ^^^^^^^^^^^  ^^^^^^^^^^^^^
   |
note: the lint level is defined here
  --> /checkout/tests/ui-fulldeps/codegen-backend/auxiliary/the_backend.rs:4:9
   |
---

---- [ui] tests/ui-fulldeps/codegen-backend/hotplug.rs#bindep stdout end ----
---- [ui] tests/ui-fulldeps/codegen-backend/hotplug.rs#dep stdout ----

error in revision `dep`: auxiliary build of /checkout/tests/ui-fulldeps/codegen-backend/auxiliary/the_backend.rs failed to compile: 
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui-fulldeps/codegen-backend/auxiliary/the_backend.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--cfg" "dep" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui-fulldeps/codegen-backend/hotplug.dep/auxiliary" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "--edition=2021" "--crate-type" "dylib" "-L" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui-fulldeps/codegen-backend/hotplug.dep/auxiliary"
stdout: none
--- stderr -------------------------------
error: unused imports: `WorkProductId` and `WorkProduct`
##[error]  --> /checkout/tests/ui-fulldeps/codegen-backend/auxiliary/the_backend.rs:17:31
   |
LL | use rustc_middle::dep_graph::{WorkProduct, WorkProductId, WorkProductMap};
   |                               ^^^^^^^^^^^  ^^^^^^^^^^^^^
   |
note: the lint level is defined here
  --> /checkout/tests/ui-fulldeps/codegen-backend/auxiliary/the_backend.rs:4:9
   |

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. rollup A PR which is a rollup 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-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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.