Skip to content

Duplicate warnings after rustup fix #3710

Closed
@phansch

Description

@phansch
Member

The ui/deprecated.stderr and ui/rename.stderr contain duplicate lint emissions in two cases after rustup to rust-lang/rust#57726.

I think the reason for the duplicates is this change here:
https://github.com/rust-lang/rust/blob/9b5535a6f38340d3be8fcae1822a04ba3febf82f/src/librustc/lint/context.rs#L1325
They now run early_lint_crate twice. Once with the builtin lints and once with the registered lint passes. Those warnings aren't generated by a normal lint but rather when the lints are looked up from attributes which happens twice now.
I'm not sure why only the first is duplicated though. Maybe because they filter duplicates but the first one has a note. 🤔

Originally posted by @mikerite in #3705 (comment)

Activity

added
C-bugCategory: Clippy is not doing the correct thing
L-suggestionLint: Improving, adding or fixing lint suggestions
on Jan 28, 2019
flip1995

flip1995 commented on Jan 29, 2019

@flip1995
Member

Maybe because they filter duplicates but the first one has a note.

I ran into that myself before. Can confirm that this is an issue: rust-lang/rust#53762 (comment)

The weird thing is, that it only happens on some lints and not on all lints.

camsteffen

camsteffen commented on Nov 15, 2021

@camsteffen
Contributor

This is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingL-suggestionLint: Improving, adding or fixing lint suggestions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @phansch@camsteffen@flip1995

        Issue actions

          Duplicate warnings after rustup fix · Issue #3710 · rust-lang/rust-clippy