Add some comments to Emitter.

There are three functions only used for the JSON format.
This commit is contained in:
Nicholas Nethercote 2024-01-05 10:49:35 +11:00
parent c4d63c7f76
commit 453fface11

View File

@ -196,13 +196,15 @@ pub trait Emitter: Translate {
fn emit_diagnostic(&mut self, diag: &Diagnostic);
/// Emit a notification that an artifact has been output.
/// This is currently only supported for the JSON format,
/// other formats can, and will, simply ignore it.
/// Currently only supported for the JSON format.
fn emit_artifact_notification(&mut self, _path: &Path, _artifact_type: &str) {}
/// Emit a report about future breakage.
/// Currently only supported for the JSON format.
fn emit_future_breakage_report(&mut self, _diags: Vec<Diagnostic>) {}
/// Emit list of unused externs
/// Emit list of unused externs.
/// Currently only supported for the JSON format.
fn emit_unused_externs(
&mut self,
_lint_level: rustc_lint_defs::Level,