Re: [PATCH] rust: pin-init: internal: suppress `explicit_outlives_requirements`
From: Gary Guo
Date: Sun Oct 11 2026 - 19:31:07 EST
On Sun Oct 11, 2026 at 2:39 PM BST, Gary Guo wrote:
> From: Gary Guo <gary@xxxxxxxxxxx>
>
> `#[pin_data]` inserts outlive bounds between lifetimes to allow closure
> callbacks to rely on their relationship. In some cases, these relations are
> implied by fields, and Rust generates `explicit_outlives_requirements`
> allow-by-default lint, which is turned out by kernel as part of
> rust-2018-idioms lint group.
>
> As `#[pin_data]` is a proc macro and it cannot know if the bounds are
> already implied, suppress such lints for generated code.
>
> Signed-off-by: Gary Guo <gary@xxxxxxxxxxx>
Applied to pin-init-next early, so it gets picked up by Monday's linux-next.
Tags are still welcome.
Best,
Gary
> ---
> rust/pin-init/internal/src/pin_data.rs | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)