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

Allow the extra_unused_lifetimes lint in the context impl #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tertsdiepraam
Copy link

@tertsdiepraam tertsdiepraam commented Jul 1, 2022

Hi!

In the uutils/coreutils repository, we ran into this issue: uutils/coreutils#3687. The minimum reproducible case is:

quick_error! {
    #[derive(Debug)]
    enum Error {
        SomeError(s: String, err: io::Error) {
            context(s: String, err: io::Error) -> (s, err)
        }
    }
}

and then running cargo clippy -- -D warnings. In this case, an impl is generated with the lifetime 'a, which is not used, since all the arguments to the context are owned, which triggers the clippy lint.

This might be a fairly niche issue, since we treat clippy warnings as errors, but it would still be nice to fix this upstream. Allowing the lint on the context impl fixed the issue.

Edit: I should probably mention that we started seeing this problem with Rust 1.62.

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.

None yet

1 participant