Skip to content

cargo clippy does not show the warnings if executed twice  #1495

@malbarbo

Description

@malbarbo
cargo new x && cd x
echo 'pub fn f() { println!("{}", *&10) }' > src/lib.rs
cargo clippy # show the warning deref_addrof
cargo clippy # do not show the warning

I would expect that the warnings to be shown again... If this is a feature, I think something must be write in the docs.

Note that adding a binary and running cargo clippy again does not show the warning in lib:

echo 'fn main() { println!("{}", *&10) }' > src/main.rs
cargo clippy # show one warning in main.rs but not in lib.rs

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messages

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions