Skip to content

WiP: Fix wrong_self_convention false positive (#3414) #3562

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

Closed
wants to merge 2 commits into from

Conversation

tormol
Copy link

@tormol tormol commented Dec 18, 2018

The current fix passes tests but is likely too broad:
It is not limited to types with generic Deref impls, and modifies SelfKind.matches() which is also used for the should_implement_trait lint.

I am a bit stuck on detecting generic Deref impls: I started copying has_debug_impl() before realizing that function takes ty::Ty instead of hir::Ty. I also haven't figured out how to get or check the associated type of a trait impl.

The issue only mentions into_* wanting self by value, but could there be similar false positives with phrases for which the lint wants &self or &mut self?

Related: It doesn't look like there's a lint against inherent methods with self on types that deref to an unknown (generic) type. Should I add one?

@flip1995 flip1995 added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Dec 19, 2018
@bors
Copy link
Contributor

bors commented Mar 11, 2019

☔ The latest upstream changes (presumably #3767) made this pull request unmergeable. Please resolve the merge conflicts.

@flip1995
Copy link
Member

Ping @tormol. I'm going over old PRs, that were abandoned by us reviewers (sorry for that!) or by the authors. Are you still interested in completing this?

@tormol
Copy link
Author

tormol commented Jun 19, 2019

Not really.

@tormol tormol closed this Jun 19, 2019
@flip1995 flip1995 added S-inactive-closed Status: Closed due to inactivity and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-inactive-closed Status: Closed due to inactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants