diff options
Diffstat (limited to 'compiler/rustc_macros/src')
| -rw-r--r-- | compiler/rustc_macros/src/diagnostics/fluent.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/compiler/rustc_macros/src/diagnostics/fluent.rs b/compiler/rustc_macros/src/diagnostics/fluent.rs index 42a1fc147f7..9f96a041487 100644 --- a/compiler/rustc_macros/src/diagnostics/fluent.rs +++ b/compiler/rustc_macros/src/diagnostics/fluent.rs @@ -97,9 +97,12 @@ pub(crate) fn fluent_messages(input: proc_macro::TokenStream) -> proc_macro::Tok let resource_contents = match read_to_string(absolute_ftl_path) { Ok(resource_contents) => resource_contents, Err(e) => { - Diagnostic::spanned(resource_span, Level::Error, "could not open Fluent resource") - .note(e.to_string()) - .emit(); + Diagnostic::spanned( + resource_span, + Level::Error, + format!("could not open Fluent resource: {}", e.to_string()), + ) + .emit(); return failed(&crate_name); } }; |
