Skip to content

Ignore nightly's new elided_named_lifetimes lint in generated code#276

Merged
dtolnay merged 1 commit intomasterfrom
elidednamed
Sep 2, 2024
Merged

Ignore nightly's new elided_named_lifetimes lint in generated code#276
dtolnay merged 1 commit intomasterfrom
elidednamed

Conversation

@dtolnay
Copy link
Owner

@dtolnay dtolnay commented Sep 2, 2024

rust-lang/rust#129207 added this lint:

warning: elided lifetime has a name
    --> tests/test.rs:1118:30
     |
1118 |         async fn f(&self) -> &str
     |                    -         ^ this elided lifetime gets resolved as `'life0`
     |                    |
     |                    lifetime `'life0` declared here
     |
     = note: `#[warn(elided_named_lifetimes)]` on by default

For #[async_trait] this is not useful because the macro needs to give names to some lifetimes which are not named in the user's code.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant