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 positive in possible_missing_comma #4399

Closed
YaLTeR opened this issue Aug 16, 2019 · 0 comments · Fixed by #5083
Closed

False positive in possible_missing_comma #4399

YaLTeR opened this issue Aug 16, 2019 · 0 comments · Fixed by #5083
Labels
C-bug Category: Clippy is not doing the correct thing

Comments

@YaLTeR
Copy link

YaLTeR commented Aug 16, 2019

clippy 0.0.212 (e3cb40e 2019-06-25) and also the nightly clippy 0.0.212 (72da101 2019-08-11)

Looks like a similar case to #3244 and #3396.

We have code like this:

  let hfilter: [i32; 7] = [
    coeffs[1][0] as i32,
    coeffs[1][1] as i32,
    coeffs[1][2] as i32,
    128
      - 2 * (coeffs[1][0] as i32 + coeffs[1][1] as i32 + coeffs[1][2] as i32),
    coeffs[1][2] as i32,
    coeffs[1][1] as i32,
    coeffs[1][0] as i32,
  ];

That expression starting with 128 got broken into two lines by rustfmt as it doesn't fit into a single line, and now clippy is reporting a possible_missing_comma there.

@YaLTeR YaLTeR changed the title False positive in possibly_missing_comma False positive in possible_missing_comma Aug 16, 2019
YaLTeR added a commit to YaLTeR/rav1e that referenced this issue Aug 16, 2019
YaLTeR added a commit to YaLTeR/rav1e that referenced this issue Aug 16, 2019
YaLTeR added a commit to YaLTeR/rav1e that referenced this issue Aug 16, 2019
@JohnTitor JohnTitor added the C-bug Category: Clippy is not doing the correct thing label Sep 4, 2019
@bors bors closed this as completed in fd6f609 Jan 25, 2020
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants