Skip to content

Tracking Issue: Prevent duplicate diagnostic emission of lints #12379

Open
@flip1995

Description

@flip1995

Description

Follow up to #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:

  • tests/ui/assign_ops2.rs
  • tests/ui/else_if_without_else.rs
  • tests/ui/identity_op.rs
  • tests/ui/indexing_slicing_index.rs
  • tests/ui/manual_retain.rs
  • tests/ui/many_single_char_names.rs
  • tests/ui/min_rust_version_invalid_attr.rs
  • tests/ui/mut_mut.rs
  • tests/ui/no_effect_replace.rs
  • tests/ui/nonminimal_bool_methods.rs
  • tests/ui/nonminimal_bool.rs
  • tests/ui/option_option.rs
  • tests/ui/ptr_as_ptr.rs
  • tests/ui/renamed_builtin_attr.rs
  • tests/ui/single_match_else.rs
  • tests/ui/single_match.rs
  • tests/ui/std_instead_of_core.rs
  • tests/ui/suspicious_operation_groupings.rs
  • tests/ui/type_complexity.rs
  • tests/ui/unknown_attribute.rs

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: Tracking IssueE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions