This makes the errors returned much cleaner; only the original error is shown and all other code still works normally. Before, the struct annotated with #[localize()]
would be reported as missing which was unnecessary noise.
73C6NOJ7W7ZCQ2THEZ4HXNZF3734VIPHI5VKQ2CCPLOA4L3JFIIQC
impl #ident {
fn localize(&self) -> String {
#original_item
impl<W: ::std::io::Write> ::fluent_embed::Localize<W> for #ident {
const CANONICAL_LOCALE: ::fluent_embed::icu_locale::LanguageIdentifier =
::fluent_embed::icu_locale::langid!("en-US");
fn available_locales(&self) -> Vec<::fluent_embed::icu_locale::LanguageIdentifier> {
unimplemented!("Encountered error in derive macro")
}
fn message_for_locale(
&self,
writer: &mut W,
locale: &::fluent_embed::icu_locale::LanguageIdentifier,
) -> Result<(), ::fluent_embed::LocalizationError> {