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

clippy: needless_lifetimes #4477

Merged

Conversation

brooksprumo
Copy link

Problem

New clippy lints when upgrading to rust 1.84.0.

error: the following explicit lifetimes could be elided: 'a
   --> sdk/frozen-abi/src/abi_example.rs:240:6
    |
240 | impl<'a, T: ?Sized, U: ?Sized> TransparentAsHelper for SerializeAsWrap<'a, T, U> {}
    |      ^^                                                                ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    = note: `-D clippy::needless-lifetimes` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::needless_lifetimes)]`
help: elide the lifetimes
    |
240 - impl<'a, T: ?Sized, U: ?Sized> TransparentAsHelper for SerializeAsWrap<'a, T, U> {}
240 + impl<T: ?Sized, U: ?Sized> TransparentAsHelper for SerializeAsWrap<'_, T, U> {}
    |
error: the following explicit lifetimes could be elided: 'a
   --> sdk/frozen-abi/src/abi_example.rs:243:6
    |
243 | impl<'a, T: ?Sized, U: ?Sized> EvenAsOpaque for SerializeAsWrap<'a, T, U> {
    |      ^^                                                         ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
243 - impl<'a, T: ?Sized, U: ?Sized> EvenAsOpaque for SerializeAsWrap<'a, T, U> {
243 + impl<T: ?Sized, U: ?Sized> EvenAsOpaque for SerializeAsWrap<'_, T, U> {
    |

Similar to #4377.

Summary of Changes

cargo clippy --fix

Partially fixes #4380

@brooksprumo brooksprumo self-assigned this Jan 15, 2025
@brooksprumo brooksprumo force-pushed the rust-1.84.0/clippy/needless_lifetimes branch from fac919b to 9eb8dd9 Compare January 15, 2025 18:11
@brooksprumo brooksprumo marked this pull request as ready for review January 15, 2025 18:27
@brooksprumo brooksprumo requested review from yihau and LucasSte January 15, 2025 18:27
@brooksprumo brooksprumo added the automerge automerge Merge this Pull Request automatically once CI passes label Jan 15, 2025
Copy link

mergify bot commented Jan 15, 2025

automerge label removed due to a CI failure

@mergify mergify bot removed the automerge automerge Merge this Pull Request automatically once CI passes label Jan 15, 2025
@brooksprumo brooksprumo merged commit 08f38c1 into anza-xyz:master Jan 15, 2025
58 checks passed
@brooksprumo brooksprumo deleted the rust-1.84.0/clippy/needless_lifetimes branch January 15, 2025 19:51
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.

New clippy lints in Rust 1.84.0
2 participants