From 5ece48116268cc84dda565d4d2641d619075c957 Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Wed, 15 Jun 2022 11:23:19 +0900 Subject: [PATCH] box `diagnostic_metadata` field --- compiler/rustc_resolve/src/late.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index 23c1767cb90..faed01a3c38 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -538,7 +538,7 @@ struct LateResolutionVisitor<'a, 'b, 'ast> { current_trait_ref: Option<(Module<'a>, TraitRef)>, /// Fields used to add information to diagnostic errors. - diagnostic_metadata: DiagnosticMetadata<'ast>, + diagnostic_metadata: Box>, /// State used to know whether to ignore resolution errors for function bodies. /// @@ -1017,7 +1017,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> { label_ribs: Vec::new(), lifetime_ribs: Vec::new(), current_trait_ref: None, - diagnostic_metadata: DiagnosticMetadata::default(), + diagnostic_metadata: Box::new(DiagnosticMetadata::default()), // errors at module scope should always be reported in_func_body: false, lifetime_uses: Default::default(),