Rollup of 6 pull requests#156831
Closed
JonathanBrouwer wants to merge 14 commits into
Closed
Conversation
…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
…enkov Privacy: enqueue type alias fixes rust-lang#156778 r? @petrochenkov
…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
Contributor
Author
|
@bors r+ rollup=never p=5 |
Contributor
This comment has been minimized.
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)
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
💔 Test for 06b26fd failed: CI. Failed job:
|
Contributor
Author
Contributor
|
Tree closed for PRs with priority less than 10. |
Contributor
|
This pull request was unapproved due to being closed. |
This was referenced May 22, 2026
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:
String/Vec#155509 ([Debug Info] Gracefully handle invalidString/Vec)r? @ghost
Create a similar rollup