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 clippy warning on FromRef derive macro #2827

Merged
merged 2 commits into from
Jul 9, 2024

Conversation

AlphaKeks
Copy link
Contributor

Motivation

Fixes a clippy warning caused by the FromRef derive macro.

See #2826.

Solution

Add the lint to the #[allow(…)] attribute above the generated function that triggers it.

@AlphaKeks
Copy link
Contributor Author

The test is failing because of the latest serde release where they leverage the new #[diagnostic::on_unimplemented] feature to give better error messages.

@jplatte
Copy link
Member

jplatte commented Jul 9, 2024

Would you mind running TRYBUILD=overwrite cargo test from axum-macros to fix this?
Just add that as a separate commit to this PR, or open another PR.

@AlphaKeks
Copy link
Contributor Author

AlphaKeks commented Jul 9, 2024

It seems like CI is running a very old version of nightly (from ~4 months ago). Running the tests on a newer release (from the past few days) results in a lot more failing tests, not only in axum-macros. I could fix just this particular case by switching to the exact same release that CI is using, but I think it's noteworthy that these tests and nightly CI should be updated at some point.

@jplatte
Copy link
Member

jplatte commented Jul 9, 2024

Yeah, I tried to bump nightly in #2805, I guess locally the trybuild tests generated different output from CI because of lockfile differences. Also David isn't currently around much to approve my PRs.

If you care, I would be happy to merge a PR that bumps nightly, and passes CI unlike mine 😄

Copy link
Member

@jplatte jplatte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@jplatte jplatte merged commit 74eac39 into tokio-rs:main Jul 9, 2024
18 checks passed
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

2 participants