DioxusLabs/dioxus · error · syn::Error
Props is not supported for tuple structs
Error message
Props is not supported for tuple structs
What it means
Compile-time rejection in the Props derive (impl_my_derive): the annotated item is a struct with unnamed (tuple) fields. The Props builder macro requires named fields to map props; the faulting input is the tuple struct declaration.
Solutions
- Convert the props tuple struct into a struct with named fields, e.g. `struct MyProps { value: String }`, since the Props derive requires named fields.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/core-macro/src/props/mod.rs:53 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of DioxusLabs/dioxus@24f6a829df (2026-08-23).
Data as JSON: /api/errors/14059f8bba197e0c.
Report an issue: GitHub.
Appendix: source
Thrown at packages/core-macro/src/props/mod.rs:53
.included_fields()
.filter(|f| {
f.builder_attr.default.is_none() && f.builder_attr.extends.is_empty()
})
.map(|f| struct_info.required_field_impl(f))
.collect::<Result<Vec<_>, _>>()?;
let build_method = struct_info.build_method_impl();
quote! {
#builder_creation
#conversion_helper
#( #fields )*
#( #extends )*
#( #required_fields )*
#build_method
}
}
syn::Fields::Unnamed(_) => {
return Err(Error::new(
ast.span(),
"Props is not supported for tuple structs",
));
}
syn::Fields::Unit => {
return Err(Error::new(
ast.span(),
"Props is not supported for unit structs",
));
}
},
syn::Data::Enum(_) => {
return Err(Error::new(ast.span(), "Props is not supported for enums"));
}
syn::Data::Union(_) => {
return Err(Error::new(ast.span(), "Props is not supported for unions"));
}
};View on GitHub (pinned to 24f6a829df)