1- /// Emit diagnostics using the `annotate-snippets` library
2- ///
3- /// This is the equivalent of `./emitter.rs` but making use of the
4- /// [`annotate-snippets`][annotate_snippets] library instead of building the output ourselves.
5- ///
6- /// [annotate_snippets]: https://docs.rs/crate/annotate-snippets/
1+ //! Emit diagnostics using the `annotate-snippets` library
2+ //!
3+ //! This is the equivalent of `./emitter.rs` but making use of the
4+ //! [`annotate-snippets`][annotate_snippets] library instead of building the output ourselves.
5+ //!
6+ //! [annotate_snippets]: https://docs.rs/crate/annotate-snippets/
77
88use syntax_pos:: { SourceFile , MultiSpan , Loc } ;
99use crate :: {
@@ -18,16 +18,16 @@ use annotate_snippets::display_list::DisplayList;
1818use annotate_snippets:: formatter:: DisplayListFormatter ;
1919
2020
21- /// Generates diagnostics using annotate-rs
22- pub struct AnnotateRsEmitterWriter {
21+ /// Generates diagnostics using annotate-snippet
22+ pub struct AnnotateSnippetEmitterWriter {
2323 source_map : Option < Lrc < SourceMapperDyn > > ,
2424 /// If true, hides the longer explanation text
2525 short_message : bool ,
2626 /// If true, will normalize line numbers with LL to prevent noise in UI test diffs.
2727 ui_testing : bool ,
2828}
2929
30- impl Emitter for AnnotateRsEmitterWriter {
30+ impl Emitter for AnnotateSnippetEmitterWriter {
3131 /// The entry point for the diagnostics generation
3232 fn emit_diagnostic ( & mut self , db : & DiagnosticBuilder < ' _ > ) {
3333 let primary_span = db. span . clone ( ) ;
@@ -158,7 +158,7 @@ impl<'a> DiagnosticConverter<'a> {
158158 }
159159}
160160
161- impl AnnotateRsEmitterWriter {
161+ impl AnnotateSnippetEmitterWriter {
162162 pub fn new (
163163 source_map : Option < Lrc < SourceMapperDyn > > ,
164164 short_message : bool
0 commit comments