mirror of
https://git.proxmox.com/git/proxmox
synced 2025-08-11 17:31:46 +00:00
macro: error handling
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
bb62dde9b0
commit
0a8a9cdb5b
@ -428,7 +428,7 @@ fn handle_struct(definition: Object, item: &syn::ItemStruct) -> Result<TokenStre
|
|||||||
let name = &item.ident;
|
let name = &item.ident;
|
||||||
|
|
||||||
match item.fields {
|
match item.fields {
|
||||||
syn::Fields::Unit => bail!("unit types are not allowed"),
|
syn::Fields::Unit => c_bail!(item.span(), "unit types are not allowed"),
|
||||||
syn::Fields::Unnamed(ref fields) => handle_struct_unnamed(definition, name, fields),
|
syn::Fields::Unnamed(ref fields) => handle_struct_unnamed(definition, name, fields),
|
||||||
syn::Fields::Named(ref fields) => handle_struct_named(definition, name, fields),
|
syn::Fields::Named(ref fields) => handle_struct_named(definition, name, fields),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user