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

implement a lint for suspicious auto trait impls #93267

Merged
merged 3 commits into from Feb 1, 2022

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Jan 24, 2022

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jan 24, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 24, 2022
@lcnr lcnr added A-traits Area: Trait system F-auto_traits `#![feature(auto_traits)]` labels Jan 24, 2022
@lcnr lcnr marked this pull request as draft January 24, 2022 15:52
@rust-log-analyzer

This comment has been minimized.

@lcnr lcnr marked this pull request as ready for review January 24, 2022 16:35
@rust-log-analyzer

This comment has been minimized.

Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

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

This code lgtm, seems like a good start, did we create the relevant tracking issue etc?

//
// What we do here is a bit simpler:
//
// - badly check if an auto impl candidate definitely does not apply
Copy link
Contributor

Choose a reason for hiding this comment

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

this made me laugh

@lcnr lcnr force-pushed the auto-trait-lint branch 2 times, most recently from 7a69420 to 21bee99 Compare January 27, 2022 09:53
@lcnr
Copy link
Contributor Author

lcnr commented Jan 27, 2022

@nikomatsakis should now be ready, tracking issue is #93367

lint impl is the same, error message has been updated and some changes to our future compat system.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@lcnr lcnr closed this Jan 27, 2022
@lcnr lcnr reopened this Jan 27, 2022
@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jan 31, 2022

📌 Commit 2e9ee90 has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 31, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 31, 2022
implement a lint for suspicious auto trait impls

cc rust-lang#85048 (comment)

r? `@nikomatsakis`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 31, 2022
implement a lint for suspicious auto trait impls

cc rust-lang#85048 (comment)

r? ``@nikomatsakis``
@ehuss
Copy link
Contributor

ehuss commented Feb 1, 2022

@bors r-

Failed in #93525 (comment), it looks like the clippy tests might need to be blessed?

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 1, 2022
@lcnr
Copy link
Contributor Author

lcnr commented Feb 1, 2022

@bors r=nikomatsakis

@bors
Copy link
Contributor

bors commented Feb 1, 2022

📌 Commit 94b0a7b has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 1, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 1, 2022
implement a lint for suspicious auto trait impls

cc rust-lang#85048 (comment)

r? `@nikomatsakis`
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 1, 2022
…askrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#86374 (Enable combining `+crt-static` and `relocation-model=pic` on `x86_64-unknown-linux-gnu`)
 - rust-lang#91828 (Implement `RawWaker` and `Waker` getters for underlying pointers)
 - rust-lang#92021 (Eliminate duplicate codes of is_single_fp_element)
 - rust-lang#92584 (add rustc lint, warning when iterating over hashmaps 2)
 - rust-lang#93267 (implement a lint for suspicious auto trait impls)
 - rust-lang#93290 (remove `TyS::same_type`)
 - rust-lang#93436 (Update compiler_builtins to fix duplicate symbols in `armv7-linux-androideabi` rlib)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit eb01fe8 into rust-lang:master Feb 1, 2022
@rustbot rustbot added this to the 1.60.0 milestone Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-traits Area: Trait system F-auto_traits `#![feature(auto_traits)]` S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants