Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Sep 2, 2024

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.

@dtolnay dtolnay merged commit 8fbf118 into master Sep 2, 2024
20 checks passed
@dtolnay dtolnay deleted the elidednamed branch September 2, 2024 04:31
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