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

Remove unneeded 'static lifetimes on &strs in constants #8698

Conversation

maxdeviant
Copy link
Member

This PR removes unneeded 'static lifetimes on &strs stored in const declarations.

This addresses some Clippy lints about redundant_static_lifetimes.

In item-level const declarations we can rely on lifetime elision and use the default 'static lifetime.

Note that associated constants still require an explicit 'static lifetime, as explained in rust-lang/rust#115010.

Release Notes:

  • N/A

@maxdeviant maxdeviant self-assigned this Mar 2, 2024
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 2, 2024
@maxdeviant maxdeviant merged commit ca2cda8 into main Mar 2, 2024
8 checks passed
@maxdeviant maxdeviant deleted the marshall/remove-unneeded-static-lifetimes-on-strs-in-constants branch March 2, 2024 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant