]> git.ipfire.org Git - thirdparty/linux.git/commit
rust: pin-init: internal: add missing where clause to projection types
authorMohamad Alsadhan <mo@sdhn.cc>
Tue, 28 Apr 2026 13:10:54 +0000 (14:10 +0100)
committerGary Guo <gary@garyguo.net>
Sun, 10 May 2026 21:58:34 +0000 (22:58 +0100)
commit5edf8ac281ad04433c606917a1a9e88bf8fa10d8
treeab81dc020db5f9f42986bd7ccfca08335f29c6ab
parentde54c2cb052952df2a6f91617471d1f02f213d4e
rust: pin-init: internal: add missing where clause to projection types

`#[pin_data]` failed to propagate the struct's `where` clause to the
generated projection struct. As a result, bounds written in a `where`
clause could be dropped during expansion, causing type errors when
fields depended on those bounds.

Fix this by adding the missing `where` clause to the generated
projection struct.

Reported-by: Andreas Hindborg <a.hindborg@kernel.org>
Closes: https://rust-for-linux.zulipchat.com/#narrow/channel/561532-pin-init/topic/generic.20bounds.20and.20.60.23.5Bpin_data.5D.60/with/578381591
Signed-off-by: Mohamad Alsadhan <mo@sdhn.cc>
Reviewed-by: Gary Guo <gary@garyguo.net>
[ Reworded commit message - Gary ]
Link: https://patch.msgid.link/20260428-pin-init-sync-v1-5-07f9bd3859fb@garyguo.net
Signed-off-by: Gary Guo <gary@garyguo.net>
rust/pin-init/internal/src/pin_data.rs