mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-05 03:23:25 +00:00
clippy::filter_next
This commit is contained in:
parent
aa74c75d84
commit
066eb6ab5d
@ -290,13 +290,9 @@ fn suggest_restriction(
|
|||||||
} else {
|
} else {
|
||||||
// Trivial case: `T` needs an extra bound: `T: Bound`.
|
// Trivial case: `T` needs an extra bound: `T: Bound`.
|
||||||
let (sp, suggestion) = match (
|
let (sp, suggestion) = match (
|
||||||
generics
|
generics.params.iter().find(|p| {
|
||||||
.params
|
|
||||||
.iter()
|
|
||||||
.filter(|p| {
|
|
||||||
!matches!(p.kind, hir::GenericParamKind::Type { synthetic: Some(_), .. })
|
!matches!(p.kind, hir::GenericParamKind::Type { synthetic: Some(_), .. })
|
||||||
})
|
}),
|
||||||
.next(),
|
|
||||||
super_traits,
|
super_traits,
|
||||||
) {
|
) {
|
||||||
(_, None) => predicate_constraint(
|
(_, None) => predicate_constraint(
|
||||||
|
Loading…
Reference in New Issue
Block a user