We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa74c75 commit 066eb6aCopy full SHA for 066eb6a
compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
@@ -290,13 +290,9 @@ fn suggest_restriction(
290
} else {
291
// Trivial case: `T` needs an extra bound: `T: Bound`.
292
let (sp, suggestion) = match (
293
- generics
294
- .params
295
- .iter()
296
- .filter(|p| {
297
- !matches!(p.kind, hir::GenericParamKind::Type { synthetic: Some(_), .. })
298
- })
299
- .next(),
+ generics.params.iter().find(|p| {
+ !matches!(p.kind, hir::GenericParamKind::Type { synthetic: Some(_), .. })
+ }),
300
super_traits,
301
) {
302
(_, None) => predicate_constraint(
0 commit comments