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

False negative in or_fn_call pertaining to nested ctors #4019

Closed
Manishearth opened this issue Apr 23, 2019 · 0 comments · Fixed by #4084
Closed

False negative in or_fn_call pertaining to nested ctors #4019

Manishearth opened this issue Apr 23, 2019 · 0 comments · Fixed by #4084
Labels
C-bug Category: Clippy is not doing the correct thing E-medium Call for participation: Medium difficulty level problem and requires some initial experience.

Comments

@Manishearth
Copy link
Member

#4018 fixes the main false positive in or_fn_call when it comes to things like .or(Some(foo)), keeping them exempt from the lint. However, in the process it also ignores .or(Some(foo.clone()), which it shouldn't.

We should have a visitor there that ensures that all expressions are either paths or ctors.

@Manishearth Manishearth added C-bug Category: Clippy is not doing the correct thing E-medium Call for participation: Medium difficulty level problem and requires some initial experience. labels Apr 23, 2019
@ghost ghost mentioned this issue May 12, 2019
bors added a commit that referenced this issue May 13, 2019
bors added a commit that referenced this issue May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing E-medium Call for participation: Medium difficulty level problem and requires some initial experience.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant