diff options
| author | klensy <klensy@users.noreply.github.com> | 2023-12-30 18:11:41 +0300 |
|---|---|---|
| committer | klensy <klensy@users.noreply.github.com> | 2024-01-07 16:53:32 +0300 |
| commit | 5b153b52a25dfe4c9592dd6c9f47582018b4fa61 (patch) | |
| tree | c61d0026529c6fed906e80493e3269e23030f082 /compiler/rustc_fluent_macro/src/fluent.rs | |
| parent | 5cb2e7dfc362662b0036faad3bab88d73027fd05 (diff) | |
| download | rust-5b153b52a25dfe4c9592dd6c9f47582018b4fa61.tar.gz rust-5b153b52a25dfe4c9592dd6c9f47582018b4fa61.zip | |
annotate-snippets: update to 0.10
Diffstat (limited to 'compiler/rustc_fluent_macro/src/fluent.rs')
| -rw-r--r-- | compiler/rustc_fluent_macro/src/fluent.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/compiler/rustc_fluent_macro/src/fluent.rs b/compiler/rustc_fluent_macro/src/fluent.rs index 3b1b63455ed..520a64aaf5e 100644 --- a/compiler/rustc_fluent_macro/src/fluent.rs +++ b/compiler/rustc_fluent_macro/src/fluent.rs @@ -1,7 +1,4 @@ -use annotate_snippets::{ - display_list::DisplayList, - snippet::{Annotation, AnnotationType, Slice, Snippet, SourceAnnotation}, -}; +use annotate_snippets::{Annotation, AnnotationType, Renderer, Slice, Snippet, SourceAnnotation}; use fluent_bundle::{FluentBundle, FluentError, FluentResource}; use fluent_syntax::{ ast::{ @@ -179,10 +176,9 @@ pub(crate) fn fluent_messages(input: proc_macro::TokenStream) -> proc_macro::Tok range: (pos.start, pos.end - 1), }], }], - opt: Default::default(), }; - let dl = DisplayList::from(snippet); - eprintln!("{dl}\n"); + let renderer = Renderer::plain(); + eprintln!("{}\n", renderer.render(snippet)); } return failed(&crate_name); |
