librustc_errors: Rename AnnotateRs -> AnnotateSnippet
The proper name of the library is `annotate-snippet`, not `annotate-rs`,
this commit should get rid of any confusing `AnnotateRs` names.
1. Renames `annotate_rs_emitter.rs` to
`annotate_snippet_emitter_writer.rs` so that the difference between the
`Emitter` trait and the implementers is more clear.
2. Renames `AnnotateRsEmitterWriter` to `AnnotateSnippetEmitterWriter`
3. Renames `HumanReadableErrorType::AnnotateRs` to `HumanReadableErrorType::AnnotateSnippet`
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
index 6a35906..003fdd5 100644
--- a/src/librustc/session/config.rs
+++ b/src/librustc/session/config.rs
@@ -2003,7 +2003,7 @@
None |
Some("human") => ErrorOutputType::HumanReadable(HumanReadableErrorType::Default(color)),
Some("human-annotate-rs") => {
- ErrorOutputType::HumanReadable(HumanReadableErrorType::AnnotateRs(color))
+ ErrorOutputType::HumanReadable(HumanReadableErrorType::AnnotateSnippet(color))
},
Some("json") => ErrorOutputType::Json { pretty: false, json_rendered },
Some("pretty-json") => ErrorOutputType::Json { pretty: true, json_rendered },
@@ -2041,7 +2041,7 @@
"--error-format=pretty-json is unstable",
);
}
- if let ErrorOutputType::HumanReadable(HumanReadableErrorType::AnnotateRs(_)) =
+ if let ErrorOutputType::HumanReadable(HumanReadableErrorType::AnnotateSnippet(_)) =
error_format {
early_error(
ErrorOutputType::Json { pretty: false, json_rendered },