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

FN unused_unit: function headers in where clauses #5585

Closed
matthiaskrgr opened this issue May 11, 2020 · 0 comments · Fixed by #5592
Closed

FN unused_unit: function headers in where clauses #5585

matthiaskrgr opened this issue May 11, 2020 · 0 comments · Fixed by #5592
Labels
C-bug Category: Clippy is not doing the correct thing C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages

Comments

@matthiaskrgr
Copy link
Member

trait tr {
    fn func<F>(f: F)
    where
        F: FnOnce() -> (); // false negative
}

struct A {}

fn main() {}

impl tr for A {
    fn func<F>(f: F)
    where
        F: FnOnce() -> (), // false negative
    {
    }
}

Clippy does not report any of the -> ()s.

clippy 0.0.212 (9912925 2020-05-10)

@flip1995 flip1995 added C-bug Category: Clippy is not doing the correct thing C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages labels May 11, 2020
@bors bors closed this as completed in e22ccf5 May 15, 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 C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants