Skip to content

Rollup of 6 pull requests#156831

Closed
JonathanBrouwer wants to merge 14 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-mMRJsdQ
Closed

Rollup of 6 pull requests#156831
JonathanBrouwer wants to merge 14 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-mMRJsdQ

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

Walnut356 and others added 14 commits April 27, 2026 01:03
…ulacrum

[Debug Info] Gracefully handle invalid `String`/`Vec`

Somewhat related to rust-lang#150392.

Currently the handling can throw an exception, which we should absolutely not do. It causes issues with debugger adapters (e.g. CodeLLDB will hang forever. Trying to stop the debugger via vscode's interface causes a CodeLLDB to leak memory constantly until RAM is depleted and the OS starts killing processes). The exception has been replaced with a printed error message and a placeholder value.

Additionally, if a String/Vec is in an "invalid" state due to niche optimization (`capacity >= (1 << 63)`, common with `Option<String>`/`Option<Vec<T>>`), the pointer and length values will be meaningless, but are not guaranteed to be 0'd. The debugger will happily proceed as if they are useful values, and often do things like \<try to read multiple GB of data from the debugee\>.

I added simple checks to ensure that the capacity and length are within bounds, and that the pointer is non-null. If any check fails, the string/vec just acts as if it's empty.

Eventually this problem will be solved on LLDB's end via llvm/llvm-project#188487 or similar, but preventing issues on our end in the short term will help a lot.

---

try-job: aarch64-apple
…-compiler-doc-comments, r=jackh726

compiler: fix duplicated "the" in two doc-comments

Two one-line typo fixes for duplicated "the" in compiler doc-comments:
- `compiler/rustc_type_ir/src/solve/mod.rs` — "only if any of the the opaques in the opaque type storage has a hidden type" → "...any of the opaques in..."
- `compiler/rustc_borrowck/src/diagnostics/var_name.rs` — "/// Find the the name and span of the variable corresponding to the given region." → "/// Find the name and span of the variable corresponding to the given region."

No code/behavior change.
…diagnostic, r=jackh726

Remove stale RTN FIXME for assoc item constraint fallback

The old FIXME suggested that this diagnostic path should emit a `return_type_notation` feature-gate diagnostic.

That is no longer correct: RTN associated item constraints now use `(..)`, so a form like `Trait<method(): Bound>` is not made valid by enabling `return_type_notation`.

This PR removes the stale FIXME without changing the diagnostic behavior.
…contract, r=jackh726

Fix reborrow ICE in MIR place lowering

## Summary

Fixes rust-lang#156482.

This fixes an internal THIR/MIR contract inconsistency for generic reborrow expressions.

`ExprKind::Reborrow` is lowered into MIR as `Rvalue::Reborrow`, but MIR expression categorization treated it as place-like while `expr_as_place` treated evaluating it as a place as unreachable. That caused the rust-lang#156482 ICE, where the compiler panicked with `entered unreachable code` in `expr_as_place` while building MIR for a generic reborrow expression.

The fix makes the MIR builder contract explicit: a reborrow expression is rvalue-producing. Its source may be a place, but the reborrow expression itself is not an assignable place.

## What changed

- Updated MIR expression categorization so `ExprKind::Reborrow` is categorized as rvalue-producing rather than place-like.
- Updated place lowering so reborrow follows the normal rvalue temporary-materialization path if a place is needed.
- Added a targeted UI regression test covering the exact rust-lang#156482 repro.

cc @aapoalas
…ided-infer-lt-rib, r=petrochenkov

delegation: visit body under elided-infer lifetime rib

Fixes rust-lang#156806. Part of rust-lang#118212.

r? @petrochenkov
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label May 22, 2026
@rustbot rustbot added 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels May 22, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 22, 2026

📌 Commit b947a22 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 May 22, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request May 22, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #155509 ([Debug Info] Gracefully handle invalid `String`/`Vec`)
 - #156560 (compiler: fix duplicated "the" in two doc-comments)
 - #156725 (Remove stale RTN FIXME for assoc item constraint fallback)
 - #156803 (Fix reborrow ICE in MIR place lowering)
 - #156818 (Privacy: enqueue type alias)
 - #156820 (delegation: visit body under elided-infer lifetime rib)
@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
Caused by:
  curl failed

Caused by:
  [56] Failure when receiving data from the peer (OpenSSL SSL_read: OpenSSL/3.5.4: error:0A000126:SSL routines::unexpected eof while reading, errno 0)
Bootstrap failed while executing `dist --host aarch64-unknown-freebsd --target aarch64-unknown-freebsd`
Build completed unsuccessfully in 0:36:08
  local time: Fri May 22 14:12:56 UTC 2026
  network time: Fri, 22 May 2026 14:12:57 GMT
##[error]Process completed with exit code 1.
##[group]Run echo "disk usage:"

@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 22, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 22, 2026

💔 Test for 06b26fd failed: CI. Failed job:

@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors retry
@bors treeclosed=10
@bors p=10

@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 May 22, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 22, 2026

Tree closed for PRs with priority less than 10.

@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 May 22, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 22, 2026

This pull request was unapproved due to being closed.

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

Labels

rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler 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.

8 participants