Auto merge of #86338 - JohnTitor:issue-86162, r=estebank
Do not suggest impl traits as type arguments Fixes #86162
This commit is contained in:
commit
d5fd37f00f
8 changed files with 72 additions and 27 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