Skip to content

Rollup of 23 pull requests#158316

Closed
JonathanBrouwer wants to merge 65 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-5CEu820
Closed

Rollup of 23 pull requests#158316
JonathanBrouwer wants to merge 65 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-5CEu820

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

Successful merges:

Failed merges:

r? @ghost

Create a similar rollup

Voultapher and others added 30 commits April 24, 2026 14:59
When an index expression with an ambiguous type (e.g. `arr[idx.into()]`)
appears inside a cast or binary operation, the type inference error was
incorrectly attributed to the outer expression instead of the `.into()`
call. Resolve the index sub-expression type first so the error points at
the actual ambiguous site.
The region-constraint machinery for `-Zassumptions-on-binders` is
region-outlives-only. A non-lifetime binder (`for<T>`) introduces a
placeholder type in the binder's universe `u`. The rewrite that pulls
constraints out of `u` only folds regions (`PlaceholderReplacer` just
implements `fold_region`), so an alias-outlives constraint such as
`<!T as Trait>::Assoc: 'r` reaches
`pull_region_outlives_constraints_out_of_universe` still in `u` and
trips `assert!(max_universe < u)`.

Report ambiguity for those constraints instead of asserting, matching
the existing `None => Ambiguity` bail-outs in this module. The goal
then surfaces as an ordinary ambiguity error rather than an ICE.
The `MaxUniverse` region visitor matched on `ReVar` terms and unwrapped
`universe_of_lt`, which returns `None` for a variable that has already
been unified with another region. Such resolved variables can reach the
visitor while computing region assumptions under `-Zassumptions-on-binders`,
causing an ICE. Resolve the variable first and inspect whatever it points
at instead of assuming it is still an unresolved inference variable.
Adjust ambiguous index diagnostics without adding new index operand resolution points. Keep invalid operator and mismatched operand diagnostics on the operator while still pointing valid ambiguous index cases at the index operand.
They tend to have similar handling -- e.g., they should be the only
input to the `mir_shims` query -- so it's cleaner to group them
together. This will also make potential future refactorings easier, such
as only carrying `GenericArgsRef` for instances that actually use it
(e.g., `Item`) but not others (e.g., `CloneShim`).

Many of the shim variants still have `Shim` at the end of their names.
To make the refactoring easier and keep the diff clean, I will trim
those suffixes off in the next commit.
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-CI Area: Our Github Actions CI A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc F-explicit_tail_calls `#![feature(explicit_tail_calls)]` PG-exploit-mitigations Project group: Exploit mitigations 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-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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jun 23, 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

rust-bors Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 04e4c9b 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 23, 2026
@rust-bors

rust-bors Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

⌛ Trying commit 04e4c9b with merge 89c2b53

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

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

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

Copy link
Copy Markdown
Contributor Author

@bors try cancel
@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,dist-i686-msvc

@rust-bors

rust-bors Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Try build cancelled. Cancelled workflows:

@rust-bors

rust-bors Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

⌛ Trying commit 04e4c9b with merge 0b522ab

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

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

rust-bors Bot pushed a commit that referenced this pull request Jun 23, 2026
Rollup of 23 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
try-job: dist-i686-msvc
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job dist-various-1 failed! Check out the build log: (web) (plain enhanced) (plain)

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

error[E0425]: cannot find value `AT_SYMLINK_NOFOLLOW` in crate `libc`
    --> /rustc/0b522ab0b9875b7cc5cb375ba5ec65db09bbada8/library/std/src/sys/fs/unix.rs:2016:77
     |
2016 |                 libc::fchmodat(libc::AT_FDCWD, p.as_ptr(), perm.mode, libc::AT_SYMLINK_NOFOLLOW)
     |                                                                             ^^^^^^^^^^^^^^^^^^^ not found in `libc`

For more information about this error, try `rustc --explain E0425`.
[RUSTC-TIMING] std test:false 2.688
warning: `std` (lib) generated 1 warning

@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 23, 2026
@rust-bors

rust-bors Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

PR #158168, 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 23, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors try cancel

@rust-bors

rust-bors Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Try build cancelled. Cancelled workflows:

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-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc F-explicit_tail_calls `#![feature(explicit_tail_calls)]` PG-exploit-mitigations Project group: Exploit mitigations rollup A PR which is a rollup 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.