Skip to content

Fix use_self false generic arg false positive. #4242

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 1 commit into from
Closed

Fix use_self false generic arg false positive. #4242

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Jun 30, 2019

Closes #4143

changelog: none

match &expr.node {
ExprKind::Struct(path, ..) => self.check_path(&*path),
ExprKind::Call(path, ..) => {
if let ExprKind::Path(path) = &path.node {
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a comment here why it is necessary to only check_paths if the path is from a call and therefore it is not possible to use visit_path?

@flip1995 flip1995 added the S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) label Jul 3, 2019
@ghost
Copy link
Author

ghost commented Jul 9, 2019

Actually, it's not necessary. I'm going to close this pull request and submit a better one later.

@ghost ghost closed this Jul 9, 2019
@ghost ghost deleted the fix-4143-4 branch July 9, 2019 06:00
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggestion does not compile: use self with when implementing a trait for a generic type
1 participant