Skip to content

[Experiment] Box diagnostic_metadata field #98120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compiler/rustc_resolve/src/late.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<DiagnosticMetadata<'ast>>,

/// State used to know whether to ignore resolution errors for function bodies.
///
Expand Down Expand Up @@ -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(),
Expand Down