Skip to content

internal: suppress explicit_outlives_requirements - #184

Merged
nbdd0121 merged 1 commit into
mainfrom
dev/outlive
Oct 12, 2026
Merged

nbdd0121 merged 1 commit into
mainfrom
dev/outlive

Conversation

@nbdd0121

Copy link
Copy Markdown
Member

#[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.

`#[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@garyguo.net>
@nbdd0121
nbdd0121 merged commit 442d50b into main Oct 12, 2026
55 of 57 checks passed
@nbdd0121
nbdd0121 deleted the dev/outlive branch October 12, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant