Use has_impl_trait
where possible
This commit is contained in:
parent
14e92d7116
commit
b84d08d1e4
1 changed files with 1 additions and 11 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue