-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[default_constructed_unit_structs
]: do not lint on type alias paths
#10813
Conversation
r? @xFrednet (rustbot has picked a reviewer for you, use r? to override) |
Looks good to me, thank you for the addition! 👍 @bors r+ The lint is new and will be released with 1.71 if the version attribute is correct. It might be, that this changes doesn't make it into master before the beta 1.71 branch is created. I'll therefore tag it as a potential back port. As this is a complexity lint, I could see this producing quite a few FPs @rustbot label +beta-nominated |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
…ishearth [beta] Clippy beta backport Backported PRs: - rust-lang/rust-clippy#10813 - rust-lang/rust-clippy#10865 - rust-lang/rust-clippy#10873 - rust-lang/rust-clippy#10992 Those address bugs, that were either introduced with 1.71 and that we would like to address before they get into stable or bugs that were introduced in 1.70 and that we would like to be fixed in 1.71 already. Detailed arguments for the backports of those PRs are in the PRs (mostly). r? `@Mark-Simulacrum`
Fixes #10755.
Type aliases cannot be used as a constructor, so this lint should not trigger in those cases.
I also changed
clippy_utils::is_ty_alias
to also consider associated types since they kinda are type aliases too.changelog: [
default_constructed_unit_structs
]: do not lint on type alias paths