rust-lang / rust-clippy

A bunch of lints to catch common mistakes and improve your Rust code. Book: https://doc.rust-lang.org/clippy/
https://rust-lang.github.io/rust-clippy/
Other
11.24k stars 1.51k forks source link

Tracking Issue: Prevent duplicate diagnostic emission of lints #12379

Open flip1995 opened 6 months ago

flip1995 commented 6 months ago

Description

Follow up to https://github.com/rust-lang/rust-clippy/pull/12374

That PR added the -Zdeduplicate-diagnostics=yes flag to the following test files, to suppress the warning that will now be produced should new lints/tests emit duplicated diagnostics. Old lints should still be cleaned up though. Those are the test files that were affected:

To fix some of those:

  1. Pick one test and leave a comment about it
  2. Remove the -Zdeduplicate-diagnostics=yes flag from it
  3. Figure out the cause of duplicated diagnostic
  4. Fix it and write a comment here so that it gets marked as resolved.

Version

No response

Additional Labels

No response

UlazkaMateusz commented 4 months ago

Hey, tests/ui/type_complexity.rs is fixed and merged

flip1995 commented 4 months ago

Thanks, only 7 to go :rocket: I love how well this works, we have amazing contributors!

grtn316 commented 2 months ago

It appears the duplicate diag messages for:tests/ui/indexing_slicing_index.rs may be coming from the compiler instead of this project.