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 5833f74 commit cf10a0aCopy full SHA for cf10a0a
compiler/rustc_builtin_macros/src/deriving/generic/mod.rs
@@ -597,10 +597,7 @@ impl<'a> TraitDef<'a> {
597
598
let mut ty_params = params
599
.iter()
600
- .filter_map(|param| match param.kind {
601
- ast::GenericParamKind::Type { .. } => Some(param),
602
- _ => None,
603
- })
+ .filter(|param| matches!(param.kind, ast::GenericParamKind::Type{..}))
604
.peekable();
605
606
if ty_params.peek().is_some() {
0 commit comments