mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-24 07:45:13 +00:00
added shader! generate_structs
arg duplication error (#2485)
* shader struct name replacing * added shader! `generate_structs` arg duplication error * MacroInput.generate_structs is a bool rather than an Option<bool> --------- Co-authored-by: Firestar99 <4696087-firestar99@users.noreply.gitlab.com>
This commit is contained in:
parent
1b7dfc9814
commit
16973acdab
@ -418,7 +418,7 @@ impl Parse for MacroInput {
|
||||
let mut shaders = HashMap::default();
|
||||
let mut vulkan_version = None;
|
||||
let mut spirv_version = None;
|
||||
let mut generate_structs = true;
|
||||
let mut generate_structs = None;
|
||||
let mut custom_derives = None;
|
||||
let mut linalg_type = None;
|
||||
let mut dump = None;
|
||||
@ -658,7 +658,10 @@ impl Parse for MacroInput {
|
||||
}
|
||||
"generate_structs" => {
|
||||
let lit = input.parse::<LitBool>()?;
|
||||
generate_structs = lit.value;
|
||||
if generate_structs.is_some() {
|
||||
bail!(lit, "field `generate_structs` is already defined");
|
||||
}
|
||||
generate_structs = Some(lit.value);
|
||||
}
|
||||
"custom_derives" => {
|
||||
let in_brackets;
|
||||
@ -756,7 +759,7 @@ impl Parse for MacroInput {
|
||||
.collect(),
|
||||
vulkan_version,
|
||||
spirv_version,
|
||||
generate_structs,
|
||||
generate_structs: generate_structs.unwrap_or(true),
|
||||
custom_derives: custom_derives.unwrap_or_else(|| {
|
||||
vec![
|
||||
parse_quote! { ::std::clone::Clone },
|
||||
|
Loading…
Reference in New Issue
Block a user