From 58f45059a5e39135ac5e26a662821dc13c0e4e56 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 29 Feb 2024 16:15:44 +1100 Subject: Add a useful comment. It took me a while to work this out. --- compiler/rustc_errors/src/json.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler/rustc_errors/src') diff --git a/compiler/rustc_errors/src/json.rs b/compiler/rustc_errors/src/json.rs index 3166768e9e2..77e4f9a0767 100644 --- a/compiler/rustc_errors/src/json.rs +++ b/compiler/rustc_errors/src/json.rs @@ -279,6 +279,7 @@ struct UnusedExterns<'a> { } impl Diagnostic { + /// Converts from `rustc_errors::DiagInner` to `Diagnostic`. fn from_errors_diagnostic(diag: crate::DiagInner, je: &JsonEmitter) -> Diagnostic { let args = to_fluent_args(diag.args.iter()); let sugg = diag.suggestions.iter().flatten().map(|sugg| { -- cgit 1.4.1-3-g733a5