We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c719a8 commit b2b3358Copy full SHA for b2b3358
src/hyperlight_guest_tracing_macro/src/lib.rs
@@ -104,6 +104,11 @@ impl syn::parse::Parse for TraceMacroInput {
104
if !matches!(message, syn::Lit::Str(_)) {
105
return Err(input.error("first argument to trace! must be a string literal"));
106
}
107
+ if let syn::Lit::Str(ref lit_str) = message {
108
+ if lit_str.value().is_empty() {
109
+ return Err(input.error("trace message must not be empty"));
110
+ }
111
112
113
let statement = if input.peek(syn::Token![,]) {
114
let _: syn::Token![,] = input.parse()?;
0 commit comments