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

Warn about supertrait bound duplicated in function trait bound (where Self: Supertrait) #8229

Closed
jendrikw opened this issue Jan 5, 2022 · 0 comments · Fixed by #8252
Closed
Labels
C-bug Category: Clippy is not doing the correct thing I-false-negative Issue: The lint should have been triggered on code, but wasn't

Comments

@jendrikw
Copy link
Contributor

jendrikw commented Jan 5, 2022

Summary

This could be covered under trait_duplication_in_bounds.

Lint Name

trait_duplication_in_bounds

Reproducer

I tried this code: play

#![warn(clippy::style, clippy::pedantic)]
trait T: Default {
    fn f() where Self: Default;
}

I expected to see this happen:
warning: this trait bound is already specified in the where clause

Instead, this happened:
no warning.

Version

rustc 1.57.0 (f1edd0429 2021-11-29)
binary: rustc
commit-hash: f1edd0429582dd29cccacaf50fd134b05593bd9c
commit-date: 2021-11-29
host: x86_64-unknown-linux-gnu
release: 1.57.0
LLVM version: 13.0.0
@jendrikw jendrikw added C-bug Category: Clippy is not doing the correct thing I-false-negative Issue: The lint should have been triggered on code, but wasn't labels Jan 5, 2022
@bors bors closed this as completed in 88cfd70 Jan 10, 2022
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 I-false-negative Issue: The lint should have been triggered on code, but wasn't
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant