We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
has_impl_trait
1 parent 14e92d7 commit b84d08dCopy full SHA for b84d08d
compiler/rustc_typeck/src/astconv/generics.rs
@@ -647,17 +647,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
647
return false;
648
}
649
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
- });
+ let impl_trait = generics.has_impl_trait();
661
662
if impl_trait {
663
let spans = seg
0 commit comments