about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src/late
diff options
context:
space:
mode:
authorDániel Buga <bugadani@gmail.com>2021-01-29 08:31:08 +0100
committerDániel Buga <bugadani@gmail.com>2021-02-01 09:23:39 +0100
commitb87e1ecdf05d4fb2d14f13d760bb37098c58b06e (patch)
tree366f3510245bdb4f2783398babd5da30fac59d89 /compiler/rustc_resolve/src/late
parentfee0d31397c5ac46d08867e903131d1d73825a9e (diff)
downloadrust-b87e1ecdf05d4fb2d14f13d760bb37098c58b06e.tar.gz
rust-b87e1ecdf05d4fb2d14f13d760bb37098c58b06e.zip
Box the biggest ast::ItemKind variants
Diffstat (limited to 'compiler/rustc_resolve/src/late')
-rw-r--r--compiler/rustc_resolve/src/late/diagnostics.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs
index bed7a350ea8..52339d723ea 100644
--- a/compiler/rustc_resolve/src/late/diagnostics.rs
+++ b/compiler/rustc_resolve/src/late/diagnostics.rs
@@ -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,