diff options
Diffstat (limited to 'compiler/rustc_errors/src/json.rs')
| -rw-r--r-- | compiler/rustc_errors/src/json.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_errors/src/json.rs b/compiler/rustc_errors/src/json.rs index dc28d1bb452..90f6df2d571 100644 --- a/compiler/rustc_errors/src/json.rs +++ b/compiler/rustc_errors/src/json.rs @@ -346,7 +346,7 @@ struct UnusedExterns<'a, 'b, 'c> { impl Diagnostic { fn from_errors_diagnostic(diag: &crate::Diagnostic, je: &JsonEmitter) -> Diagnostic { let sugg = diag.suggestions.iter().flatten().map(|sugg| Diagnostic { - message: sugg.msg.clone(), + message: sugg.msg.clone().to_string(), code: None, level: "help", spans: DiagnosticSpan::from_suggestion(sugg, je), @@ -385,7 +385,7 @@ impl Diagnostic { let output = String::from_utf8(output).unwrap(); Diagnostic { - message: diag.message(), + message: diag.message().to_string(), code: DiagnosticCode::map_opt_string(diag.code.clone(), je), level: diag.level.to_str(), spans: DiagnosticSpan::from_multispan(&diag.span, je), @@ -402,7 +402,7 @@ impl Diagnostic { fn from_sub_diagnostic(diag: &SubDiagnostic, je: &JsonEmitter) -> Diagnostic { Diagnostic { - message: diag.message(), + message: diag.message().to_string(), code: None, level: diag.level.to_str(), spans: diag |
