Use a dedicated type instead of a reference for the diagnostic context
This paves the way for tracking more state (e.g. error tainting) in the diagnostic context handle
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
//! Errors emitted by symbol_mangling.
|
||||
|
||||
use rustc_errors::{Diag, DiagCtxt, Diagnostic, EmissionGuarantee, Level};
|
||||
use rustc_errors::{Diag, DiagCtxtHandle, Diagnostic, EmissionGuarantee, Level};
|
||||
use rustc_span::Span;
|
||||
use std::fmt;
|
||||
|
||||
@@ -14,7 +14,7 @@ pub struct TestOutput {
|
||||
// natural language, and (b) it's only used in tests. So we construct it
|
||||
// manually and avoid the fluent machinery.
|
||||
impl<G: EmissionGuarantee> Diagnostic<'_, G> for TestOutput {
|
||||
fn into_diag(self, dcx: &'_ DiagCtxt, level: Level) -> Diag<'_, G> {
|
||||
fn into_diag(self, dcx: DiagCtxtHandle<'_>, level: Level) -> Diag<'_, G> {
|
||||
let TestOutput { span, kind, content } = self;
|
||||
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
|
||||
Reference in New Issue
Block a user