Box the biggest ast::ItemKind variants

This commit is contained in:
Dániel Buga
2021-01-29 08:31:08 +01:00
parent fee0d31397
commit b87e1ecdf0
34 changed files with 309 additions and 204 deletions

View File

@@ -1109,7 +1109,9 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
if assoc_item.ident == ident {
return Some(match &assoc_item.kind {
ast::AssocItemKind::Const(..) => AssocSuggestion::AssocConst,
ast::AssocItemKind::Fn(_, sig, ..) if sig.decl.has_self() => {
ast::AssocItemKind::Fn(box ast::FnKind(_, sig, ..))
if sig.decl.has_self() =>
{
AssocSuggestion::MethodWithSelf
}
ast::AssocItemKind::Fn(..) => AssocSuggestion::AssocFn,