* [GIT PULL] pin-init changes for v7.4-rc1
@ 2026-10-12 18:44 Gary Guo
2026-10-12 19:25 ` Miguel Ojeda
0 siblings, 1 reply; 2+ messages in thread
From: Gary Guo @ 2026-10-12 18:44 UTC (permalink / raw)
To: Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
Danilo Krummrich, Daniel Almeida, Tamir Duberstein,
Alexandre Courbot, Onur Özkan
Cc: rust-for-linux
Hi Miguel,
This is a cycle packed with feature updates. Two of the most anticipated
features, tuple struct support and safe self reference creation, has been
included in this pull request.
Safe self reference is a big one and is pushed a bit late in the cycle. The
initial plan was to include a minimum subset for this cycle because I was
worried about potential soundness issues; however during Plumbers it was agreed
that the features should be upstreamed at once. This is because the initial
users (Nova, JobQueue) would all need the advanced features, so it is better to
ensure that the feature get put into use for real, and it can iterate with
users, rather than being fully designed on paper. The existing safety checks
are already very comprehensive, and Benno and I are confident that if new ones
are discovered, it wouldn't affect the overall design.
That said, the the usage of the advanced features (invariance, existential
lifetime) shall be limited to the pre-agreed users only, so even in case where
the feature needs to be reworked, the blast radius is limited.
Another theme in this cycle is to improve the developer experience when things
are used wrongly. A lot of work has been done to use proper spans from
user-provided tokens so error message point to things that cause them. Many
common misuse scenarios also gain additional custom diagnostics.
All commits have been included in linux-next as of next-20261012.
Best,
Gary
The following changes since commit fd73f4a6659897191fa0d40695fe370925dd3780:
Linux 7.3-rc3 (2026-09-13 14:38:02 -0700)
are available in the Git repository at:
https://github.com/Rust-for-linux/linux.git tags/pin-init-v7.4
for you to fetch changes up to b7218f1996f8491dbe28632b70f444cb73f554df:
rust: pin-init: internal: suppress `explicit_outlives_requirements` (2026-10-12 00:27:53 +0100)
----------------------------------------------------------------
User visible changes:
- Support tuple structs.
- Allow safe creation of self references.
- Vastly improve diagnostics for common misuse scenarios.
Other changes:
- Use `mixed_site` hygiene consistently.
----------------------------------------------------------------
Gary Guo (47):
rust: pin-init: internal: extract utility code to new module
rust: pin-init: internal: init: emit `slot` using mixed site hygiene
rust: pin-init: internal: init: use `slot` identifier directly with mixed site
rust: pin-init: internal: init: provide span for slot projection
rust: pin-init: internal: use span of `Index` for generated identifiers
rust: pin-init: internal: pin_data: use HRTB to work around `trivial_bounds` for `Unpin`
rust: pin-init: internal: make `__init_data` and `__pin_data` safe
rust: pin-init: internal: remove associated type of `HasInitData`
rust: pin-init: internal: use `HasInitData` to provide inference help only
rust: pin-init: internal: add custom diagnostic when `#[pin_data]` is not implemented
rust: pin-init: add diagnostic attribute for `PinInit` and `Init`
rust: pin-init: internal: handle item and expr diagnostics differently
rust: pin-init: internal: make `DiagCtxt` available inside parser
rust: pin-init: internal: improve diagnostics robustness against panicking
rust: pin-init: internal: init: allow reborrow of `Pin<&mut T>` bindings
rust: pin-init: internal: init: improve diagnostics from field checks
rust: pin-init: internal: init: use span of `<-` or `:` for the init/write call.
rust: proc-macro2: enable `proc_macro_span` feature
rust: pin-init: internal: init: forget guards in reverse order
rust: pin-init: internal: init: set span location of guards
rust: pin-init: internal: add utility to handle generics merging
rust: pin-init: internal: add utility for extract a single attribute
rust: pin-init: internal: pin_data: move projection struct into `const _: ()` block
rust: pin-init: internal: pin_data: extract `#[cfg]` processing to its own function
rust: pin-init: internal: pin_data: rename `'__pin` lifetime to `'__this`
rust: pin-init: internal: pin_data: parse into `StructInfo` before generating
kbuild: rust: allow `clippy::comparison_chain` globally
rust: pin-init: internal: pin_data: infer self-referential struct
rust: pin-init: internal: pin_data: rewrite fields that borrow others
rust: pin-init: internal: pin_data: pin borrowed fields with wrapper
rust: pin-init: internal: pin_data: teach drop check about generics that cannot dangle
rust: pin-init: internal: pin_data: self-referential drop order checks
rust: pin-init: internal: pin_data: check covariance of self-referential fields
rust: pin-init: internal: pin_data: implement initialization of borrowed structs
rust: pin-init: internal: pin_data: project self-referential fields
rust: pin-init: internal: pin_data: add `with_project` method
rust: pin-init: internal: pin_data: enable self-referential support
rust: pin-init: internal: pin_data: allow lifetime to be shortened per field drop order
rust: pin-init: internal: pin_data: parse explicit `#[borrowed]` annotation
rust: pin-init: internal: pin_data: support mutable borrows
rust: pin-init: internal: pin_data: parse explicit `#[uses]` annotation
rust: pin-init: internal: pin_data: make field lifetime invariance imply type invariance
rust: pin-init: internal: pin_data: complete invariant borrow support
rust: pin-init: internal: pin_data: perform AST lifetime replacement if possible
rust: pin-init: internal: pin_data: support shared projection
rust: pin-init: internal: pin_data: support existential lifetimes
rust: pin-init: internal: suppress `explicit_outlives_requirements`
Mohamad Alsadhan (3):
rust: pin-init: internal: pin_data: support tuple struct projections
rust: pin-init: internal: init: support tuple structs in `[pin_]init!`
rust: pin-init: internal: init: support tuple struct constructor syntax
Makefile | 2 +
rust/Makefile | 1 +
rust/pin-init/examples/selfref.rs | 60 +
rust/pin-init/internal/src/diagnostics.rs | 153 ++-
rust/pin-init/internal/src/init.rs | 683 ++++++++--
rust/pin-init/internal/src/lib.rs | 41 +-
rust/pin-init/internal/src/pin_data.rs | 2013 +++++++++++++++++++++++++----
rust/pin-init/internal/src/util.rs | 500 +++++++
rust/pin-init/src/__internal.rs | 417 +++++-
rust/pin-init/src/lib.rs | 83 +-
rust/proc-macro2/README.md | 3 +-
rust/proc-macro2/probe/proc_macro_span.rs | 9 -
12 files changed, 3511 insertions(+), 454 deletions(-)
create mode 100644 rust/pin-init/examples/selfref.rs
create mode 100644 rust/pin-init/internal/src/util.rs
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [GIT PULL] pin-init changes for v7.4-rc1
2026-10-12 18:44 [GIT PULL] pin-init changes for v7.4-rc1 Gary Guo
@ 2026-10-12 19:25 ` Miguel Ojeda
0 siblings, 0 replies; 2+ messages in thread
From: Miguel Ojeda @ 2026-10-12 19:25 UTC (permalink / raw)
To: Gary Guo
Cc: Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
Danilo Krummrich, Daniel Almeida, Tamir Duberstein,
Alexandre Courbot, Onur Özkan, rust-for-linux
On Mon, Oct 12, 2026 at 8:44 PM Gary Guo <gary@kernel.org> wrote:
>
> Hi Miguel,
>
> This is a cycle packed with feature updates. Two of the most anticipated
> features, tuple struct support and safe self reference creation, has been
> included in this pull request.
>
> Safe self reference is a big one and is pushed a bit late in the cycle. The
> initial plan was to include a minimum subset for this cycle because I was
> worried about potential soundness issues; however during Plumbers it was agreed
> that the features should be upstreamed at once. This is because the initial
> users (Nova, JobQueue) would all need the advanced features, so it is better to
> ensure that the feature get put into use for real, and it can iterate with
> users, rather than being fully designed on paper. The existing safety checks
> are already very comprehensive, and Benno and I are confident that if new ones
> are discovered, it wouldn't affect the overall design.
>
> That said, the the usage of the advanced features (invariance, existential
> lifetime) shall be limited to the pre-agreed users only, so even in case where
> the feature needs to be reworked, the blast radius is limited.
>
> Another theme in this cycle is to improve the developer experience when things
> are used wrongly. A lot of work has been done to use proper spans from
> user-provided tokens so error message point to things that cause them. Many
> common misuse scenarios also gain additional custom diagnostics.
>
> All commits have been included in linux-next as of next-20261012.
>
> Best,
> Gary
>
> The following changes since commit fd73f4a6659897191fa0d40695fe370925dd3780:
>
> Linux 7.3-rc3 (2026-09-13 14:38:02 -0700)
>
> are available in the Git repository at:
>
> https://github.com/Rust-for-linux/linux.git tags/pin-init-v7.4
>
> for you to fetch changes up to b7218f1996f8491dbe28632b70f444cb73f554df:
>
> rust: pin-init: internal: suppress `explicit_outlives_requirements` (2026-10-12 00:27:53 +0100)
Merged into `rust-next` -- thanks!
I have quoted part of your message above into the merge commit, since
it was great context to keep, in my opinion (but if you really prefer
not to include it, please let me know).
(There were a few typos that could be fixed, but I kept it verbatim
since I was quoting.)
Cheers,
Miguel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-12 19:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-12 18:44 [GIT PULL] pin-init changes for v7.4-rc1 Gary Guo
2026-10-12 19:25 ` Miguel Ojeda
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.