1
Fork 0

Use has_impl_trait where possible

This commit is contained in:
Yuki Okushi 2021-06-16 06:36:15 +09:00
parent 14e92d7116
commit b84d08d1e4
No known key found for this signature in database
GPG key ID: DABA5B072961C18A

View file

@ -647,17 +647,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
return false;
}
let impl_trait = generics.params.iter().any(|param| {
matches!(
param.kind,
ty::GenericParamDefKind::Type {
synthetic: Some(
hir::SyntheticTyParamKind::ImplTrait | hir::SyntheticTyParamKind::FromAttr,
),
..
}
)
});
let impl_trait = generics.has_impl_trait();
if impl_trait {
let spans = seg