Skip to content

Rollup of 24 pull requests - #165038

Closed
JonathanBrouwer wants to merge 76 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-9m6Cdiq
Closed

JonathanBrouwer wants to merge 76 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-9m6Cdiq

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

Warning

This rollup conflicts with pending auto build #165031 and may need to be recreated if the pending build succeeds.

r? @ghost

Create a similar rollup

heiher and others added 30 commits October 3, 2026 20:26
ICX was bumped to 2026.2 on this image which broke the path lookup
Previously, expressions behind stmt_expr_attributes were only rejected
when the cfg condition evaluated to false. If the condition was true,
the code compiled successfully.

This meant code like an attributed binary operand could compile on one
platform but fail on another, even though removing the operand would leave
an invalid expression.

This change always rejects cfg in expression positions where removing the
expression would produce invalid code. Expression positions where removal is
safe continue to work as before.

Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
```
error[E0310]: the parameter type `R` may not live long enough
  --> $DIR/implicit-static-lifetime-in-dyn-trait-return-type.rs:10:5
   |
LL | fn bb<R>(r: R) -> Box<dyn Foo> {
   |                       ------- this `dyn Trait` has an implicit `'static` lifetime bound 3
LL |     Box::new(Bar(r))
   |     ^^^^^^^^^^^^^^^^
   |     |
   |     the parameter type `R` must be valid for the static lifetime...
   |     ...so that the type `R` will meet its required lifetime bounds
   |
help: consider adding an explicit lifetime bound
   |
LL | fn bb<R: 'static>(r: R) -> Box<dyn Foo> {
   |        +++++++++
help: consider adding an explicit lifetime bound
   |
LL | fn bb<'a, R>(r: R) -> Box<dyn Foo + 'a> {
   |       +++                         ++++
```
This avoids the unsoundness-hazard of using `&'ll mut` to represent an owning
pointer that typically does not live for as long as its enclosing context.
The SimpleCx type contains references tied to the lifetime of the LLVM context,
but the SimpleCx itself has a shorter lifetime.
This commit changes the type of LLVM context references from `&'ll Context` to
a dedicated newtype struct `Context<'ll>` with an invariant lifetime brand.

The current usage of `&'ll Context` is not sound, because covariance in `'ll`
allows different contexts to be mixed in ways that the underlying bindings are
not prepared to handle.

(Most of the time, mixing contexts is unlikely to happen by accident, but
switching to a more-sound API is good maintenance hygiene for these complex
bindings.)
Lex and parse emoji in lifetimes, and disallow them in the parser with a hard error. Allow emoji to start a lifetime name even if they are not XID_Start.

```
error: lifetimes cannot contain emoji
  --> $DIR/emoji-in-lifetime.rs:1:22
   |
LL | fn bad_lifetime_name<'🐛🐛🐛family👨👩👧👦>(
   |                      ^^^^^^^^^^^^^^^^^^^^^
```

Unify lifetime and identifier parsing. Use `bad_unicode_identifiers` for lifetimes.
During work on PR 164772 [1], I've noticed another tiny inconsistency
in doc code examples: `HashMap`'s `Entry::insert_entry()`'s
doc code example did not have an assertion where `BTreeMap`'s
`Entry::insert_entry()`'s docs did.

I've added an assertion where it was missing.

[1] rust-lang#164772
This function is documented as allowed to continue, which is useful
behavior during const eval. Split a new `resumable_breakpoint` intrinsic
from `breakpoint` which has the behavior of continuing in Miri and CTFE.
Report the same error for true and false cfg predicates when the
surrounding expression cannot be removed. Apply it consistently during
normal expansion and cfg_eval.

Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-rustdoc-js Area: Rustdoc's JS front-end A-rustdoc-json Area: Rustdoc JSON backend A-rustdoc-search Area: Rustdoc's search feature F-autodiff `#![feature(autodiff)]` O-apple Operating system: Apple / Darwin (macOS, iOS, tvOS, visionOS, watchOS) O-linux Operating system: Linux O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ O-windows Operating system: Windows 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-clippy Relevant to the Clippy team. 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 Oct 27, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5 force

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

@rust-bors

rust-bors Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 57be3c2 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 Oct 27, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 27, 2026
Rollup of 24 pull requests


try-job: dist-various-1
try-job: test-various
try-job: test-x86_64-gnu-aux
try-job: test-x86_64-msvc-1
try-job: test-aarch64-apple-1
try-job: test-aarch64-apple-2
try-job: test-x86_64-mingw-1
try-job: test-i686-msvc
try-job: test-armhf-gnu
try-job: test-x86_64-gnu-llvm-22-3
@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 Oct 27, 2026
@rust-bors

rust-bors Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved due to being closed.

@rust-bors

rust-bors Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 6eac8dd (6eac8dd2c07b96e2e9fe90ed3a0c981e65d485f5)
Base parent: 16d1ffa (16d1ffac17ad8b739e32483ac2e65fe7e1804977)

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. A-rustdoc-js Area: Rustdoc's JS front-end A-rustdoc-json Area: Rustdoc JSON backend A-rustdoc-search Area: Rustdoc's search feature F-autodiff `#![feature(autodiff)]` O-apple Operating system: Apple / Darwin (macOS, iOS, tvOS, visionOS, watchOS) O-linux Operating system: Linux O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ O-windows Operating system: Windows 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-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-clippy Relevant to the Clippy team. 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.