Skip to content

Rollup of 11 pull requests - #165844

Open
Zalathar wants to merge 35 commits into
rust-lang:mainfrom
Zalathar:rollup-BB6Dp3b
Open

Zalathar wants to merge 35 commits into
rust-lang:mainfrom
Zalathar:rollup-BB6Dp3b

Conversation

@Zalathar

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

fmease and others added 30 commits October 30, 2026 11:27
(cherry picked from commit b791169)
LangItem might eventually be the type that forces us to support
`#[derive(StableHash)]` for enums with more than 256 variants.
This commit also removes `#[derive(Hash)]` from the affected types, since it is
no longer used.

If these types need a plain Hash impl is needed in the future, it could
potentially share the `stable_hash_inner` implementation.
By moving away from the old `impl_stable_traits_for_trivial_type!` macro, this
commit has the side-effect of removing unused StableOrd impls for some types.
Those impls could potentially be re-added if they are ever needed.
Add a test for a case that results in a recursive loop that runs until
it runs out of memory or gets killed. This used to take a long time to
compile because of nested recursion caused by dereferencing the type of
the struct.

Signed-off-by: Hardik Kumar <hardikxk@gmail.com>
This pulls some less-trivial changes out of the main migration to `Value<'ll>`.
derived impls kept the lifetime spans of the derive input so the external macro check missed them and `#[expect(redundant_lifetimes)]` on a derived struct went unfulfilled. the lint now skips items whose own span is in an external macro.
Just because the parser of a specific syntax fragment kind returns an
`Err(_)` doesn't automatically mean that the problematic token sequence
isn't "of" that fragment's kind. The token sequence might "almost" be of
that kind (i.e., share a non-empty prefix) but simply contain a syntax
error in it.

On a side note, it's rather odd that the now removed
`annotate_err_with_kind` only added the note "this macro call doesn't
expand to a $fragkind" if the target fragment kind was *type* or *pat*,
there are 20 kinds at the of writing.
…..)`

This also means that it's now available under `core::pat` instead of
`core` directly. This makes it consistent with the `std` re-export
which is only available under `std::pat` and not under `std` directly.

Moreover, drop library feature `pattern_type_macro` and demote language
feature `pattern_types` to a library feature. This is nice because it
means `std::pat::pattern_type` is no longer unnecessarily gated behind
two (!) feature gates.
This also means that it's now available under `core::view` instead of
`core` directly. This makes it consistent with the `std` re-export
which is only available under `std::view` and not under `std` directly.

Moreover, drop library feature `view_type_macro` and demote language
feature `view_types` to a library feature. This is nice because it
means `std::view::view_type` is no longer unnecessarily gated behind
two (!) feature gates.
Co-authored-by: xkevio <xkeviota@gmail.com>

style: use ecx stmt item method
cg_llvm: Use an invariant lifetime brand for LLVM values

This PR changes the type of LLVM value references from `&'ll Value` to `Value<'ll>` with an invariant lifetime brand, to help uphold soundness of the FFI bindings.

There should be no change to compiler output.

---

Value is one of the more widely-used types, much more so than Type, so unfortunately this step ends up needing to touch quite a lot of code. Thankfully almost all of the changes are trivial.
…rk-Simulacrum

Bump stage0 to 1.101.0-beta.1

https://forge.rust-lang.org/release/process.html#default-branch-bootstrap-update-and-crater-tuesday

- run replace-version-placeholder (cherry-picked from beta)
- bump stage0 to 1.101.0-beta.1
- update STAGE0_MISSING_TARGETS
- reformat with `cfg_select!` awareness
- update `cfg(bootstrap)`
Implement `core::ops::FnAddr`

This implements `FnAddr` as proposed in rust-lang/libs-team#837 (comment).

This is my first contribution to the rust compiler, so I'm not 100% familiar with the process.

All code was hand written by me.

cc rust-lang#148768
…syntax, r=mati865

Migrate built-in macros `pattern_type` & `view_type` to macros 2.0 that expand to internal syntax

Part of MCP-approved rust-lang#110680.

Best reviewed commit by commit. Please see individual commit messages for further details.

Pinging owner of pattern types @oli-obk & owner of view types @scrabsha for visibility.

<sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>
…ternal-macro, r=petrochenkov

do not lint `redundant_lifetimes` on items from external macros

derived impls copy the lifetime spans from the derive input so the external macro check on the lint span never fires and the lint is reported on the generated impl. that also left `#[expect(redundant_lifetimes)]` on a derived struct unfulfillable. now the lint skips items whose own span is in an external macro.

fixes rust-lang#150553
as suggested in rust-lang#150553 (comment)

r? @petrochenkov
feat: support nested functions with `#[offload_kernel]`

Related to rust-lang#131513.

Allows annotating nested functions with `#[offload_kernel]`, similar to autodiff.

Also fixes the error message when `#[offload_kernel]` is used on anything other than functions.

r? @ZuseZ4

(@Sa4dUs, ping)
@rustbot rustbot added A-linkedlist Area: `std::collections::LinkedList` A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-networking Area: `std::net` A-option-result Area: Option and Result combinators A-raw-pointers Area: raw pointers, MaybeUninit, NonNull A-rc Area: `Rc` and `Arc` A-run-make Area: port run-make Makefiles to rmake.rs A-slice-vec Area: `[T]` and `Vec<T>` A-str Area: `str` and `String` A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-minicore` A-vecdeque Area: `std::collections::VecDeque` F-autodiff `#![feature(autodiff)]` O-windows Operating system: Windows PG-exploit-mitigations Project group: Exploit mitigations 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-release Relevant to the release subteam, 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Nov 12, 2026
@Zalathar

Copy link
Copy Markdown
Member Author

Rollup of everything.

@bors r+ rollup=never p=5 force

@rust-bors

rust-bors Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

📌 Commit b8a88ea has been approved by Zalathar

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

rust-bors Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

⌛ Testing commit b8a88ea with merge 6b05f82...

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

rust-bors Bot pushed a commit that referenced this pull request Nov 12, 2026
Rollup of 11 pull requests

Successful merges:

 - #165804 (cg_llvm: Use an invariant lifetime brand for LLVM values)
 - #165778 (Bump stage0 to 1.101.0-beta.1)
 - #165412 (Implement `core::ops::FnAddr`)
 - #165487 (Migrate built-in macros `pattern_type` & `view_type` to macros 2.0 that expand to internal syntax)
 - #165818 (do not lint `redundant_lifetimes` on items from external macros)
 - #163077 (feat: support nested functions with `#[offload_kernel]`)
 - #164795 (Extend support of lint `explicit_outlives_requirements` to checked type aliases)
 - #165578 (Avoid `Hash::hash` when stable-hashing various types)
 - #165729 (tests: Add regression test for infinite recursive dereference)
 - #165822 (Remove unused compiler modules and types)
 - #165824 (Add regression test for HRTB projection bound with TryFrom error)

This branch has not been deployed

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-binaryheap Area: `std::collections::BinaryHeap` A-btree Area: `std::collections::{BTreeMap, BTreeSet}` A-collections Area: `std::collections` (prefer A-binaryheap, A-btree, A-hashtable, A-linkedlist, A-vecdeque) A-filesystem Area: `std::fs` A-fmt Area: `core::fmt` A-linkedlist Area: `std::collections::LinkedList` A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-networking Area: `std::net` A-option-result Area: Option and Result combinators A-raw-pointers Area: raw pointers, MaybeUninit, NonNull A-rc Area: `Rc` and `Arc` A-run-make Area: port run-make Makefiles to rmake.rs A-slice-vec Area: `[T]` and `Vec<T>` A-str Area: `str` and `String` A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-minicore` A-vecdeque Area: `std::collections::VecDeque` F-autodiff `#![feature(autodiff)]` O-windows Operating system: Windows PG-exploit-mitigations Project group: Exploit mitigations rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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-release Relevant to the release subteam, 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. 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.

10 participants