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

[default_constructed_unit_structs]: do not lint on type alias paths #10813

Merged
merged 1 commit into from
May 26, 2023

Conversation

y21
Copy link
Member

@y21 y21 commented May 22, 2023

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

@rustbot
Copy link
Collaborator

rustbot commented May 22, 2023

r? @xFrednet

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label May 22, 2023
@xFrednet
Copy link
Member

xFrednet commented May 26, 2023

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

@bors
Copy link
Collaborator

bors commented May 26, 2023

📌 Commit 8c82486 has been approved by xFrednet

It is now in the queue for this repository.

@rustbot rustbot added the beta-nominated Nominated for backporting to the compiler in the beta channel. label May 26, 2023
@bors
Copy link
Collaborator

bors commented May 26, 2023

⌛ Testing commit 8c82486 with merge f1fd467...

@bors
Copy link
Collaborator

bors commented May 26, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: xFrednet
Pushing f1fd467 to master...

@bors bors merged commit f1fd467 into rust-lang:master May 26, 2023
4 checks passed
@flip1995 flip1995 added beta-accepted Accepted for backporting to the compiler in the beta channel. and removed beta-nominated Nominated for backporting to the compiler in the beta channel. labels Jul 6, 2023
@flip1995
Copy link
Member

flip1995 commented Jul 6, 2023

rust-lang/rust#113417

bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 6, 2023
…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`
@xFrednet xFrednet removed the beta-accepted Accepted for backporting to the compiler in the beta channel. label Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FP: default_constructed_unit_structs
5 participants