Skip to content

Commit b84d08d

Browse files
committed
Use has_impl_trait where possible
1 parent 14e92d7 commit b84d08d

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

compiler/rustc_typeck/src/astconv/generics.rs

+1-11
Original file line numberDiff line numberDiff line change
@@ -647,17 +647,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
647647
return false;
648648
}
649649

650-
let impl_trait = generics.params.iter().any(|param| {
651-
matches!(
652-
param.kind,
653-
ty::GenericParamDefKind::Type {
654-
synthetic: Some(
655-
hir::SyntheticTyParamKind::ImplTrait | hir::SyntheticTyParamKind::FromAttr,
656-
),
657-
..
658-
}
659-
)
660-
});
650+
let impl_trait = generics.has_impl_trait();
661651

662652
if impl_trait {
663653
let spans = seg

0 commit comments

Comments
 (0)