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

Fix #47 #49

Closed
wants to merge 1 commit into from
Closed

Fix #47 #49

wants to merge 1 commit into from

Conversation

barafael
Copy link

The generated code mentioned #name explicitly, causing
clippy::nursery warning use_self to trigger on the generated code.
This commit replaces usages of #name with Self where deemed
applicable, and the warning is no longer thrown.

Let me know what you think :)

The generated code mentioned `#name` explicitly, causing
`clippy::nursery` warning `use_self` to trigger on the generated code.
This commit replaces usages of `#name` with `Self` where deemed
applicable, and the warning is no longer thrown.
@cuviper
Copy link
Member

cuviper commented Jun 23, 2022

Unfortunately, Self as a type constructor was only stabilized in Rust 1.32, barely missing our current 1.31 MSRV.

So the few places where you changed to Self:: should be fine, but map(Self) and returning Self(...) are not, at least until we do bump MSRV. I don't think it's worth bumping just for this nursery lint, but we could #[allow(clippy::use_self)] on those affected impl blocks.

@barafael
Copy link
Author

The issue is being worked on in a generic way at:
rust-lang/rust-clippy#6902
As the faulty lint has now made it beyond nursery. Perhaps we can wait with merging this until you raise the MSRV?

@barafael
Copy link
Author

barafael commented Nov 1, 2022

Since rust-lang/rust-clippy#6902 has been closed, I suppose we can close this one as well :) right?

@cuviper
Copy link
Member

cuviper commented Nov 2, 2022

Thanks for checking back on this! Yes, I think we can close with clippy's resolution.

@cuviper cuviper closed this Nov 2, 2022
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.

2 participants