Skip to content

Do not build an extra identical structure #2440

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

Merged
merged 1 commit into from
Mar 14, 2023

Conversation

samueltardieu
Copy link
Contributor

This makes the code more complex than needed.

Part of a clippy lint being developed.

This makes the code more complex than needed.

Part of a clippy lint being developed.
@pvdrz pvdrz merged commit 91df88d into rust-lang:main Mar 14, 2023
bors added a commit to rust-lang/rust-clippy that referenced this pull request Mar 24, 2023
New lint: detect unnecessary struct building

Fixes #10476.

Running this lint on the top 500 crates produced one hit (in `rust-lang/rust-bindgen`) and [a PR has been submitted there](rust-lang/rust-bindgen#2440).

changelog: [`unnecessary_struct_initialization`]: new lint
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