Report warnings from the slint! macro

This commit is contained in:
Olivier Goffart 2023-03-23 13:14:08 +01:00 committed by Olivier Goffart
parent 84fabee539
commit 20973bdb7b
2 changed files with 12 additions and 3 deletions

View file

@ -384,5 +384,9 @@ pub fn slint(stream: TokenStream) -> TokenStream {
result.extend(reload);
result.extend(quote! {const _ : Option<&'static str> = ::core::option_env!("SLINT_STYLE");});
result.into()
let mut result = TokenStream::from(result);
if !diag.is_empty() {
result.extend(diag.report_macro_diagnostic(&tokens));
}
result
}