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 4f2048d commit 6a21a29Copy full SHA for 6a21a29
crates/spirv-std/macros/src/lib.rs
@@ -376,7 +376,17 @@ impl syn::parse::Parse for PrintfInput {
376
let mut expressions = Vec::new();
377
while !input.is_empty() {
378
input.parse::<syn::Token![,]>()?;
379
- expressions.push(input.parse()?);
+
380
+ let expr = input.parse()?;
381
382
+ if let syn::Expr::Lit(syn::ExprLit { lit: syn::Lit::Str(lit_str), ..}) = expr {
383
+ return Err(syn::Error::new(
384
+ lit_str.span(),
385
+ "String literals should be part of the format string.",
386
+ ))
387
+ }
388
389
+ expressions.push(expr);
390
}
391
expressions
392
},
0 commit comments