DioxusLabs/dioxus · error
If you use keyword arguments (e.g., `name` = Something)…
Error message
If you use keyword arguments (e.g., `name` = Something), then you can no longer use arguments without a keyword.
What it means
The #[server] macro is mixing argument styles: keyword arguments (name = Something) were used first, then a non-keyword argument appeared. Once any keyword argument is used, all arguments must be keyword arguments.
Solutions
- Once you use a keyword argument (name = value), all following arguments must also use keywords; add the appropriate keyword to the positional argument.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/fullstack-macro/src/lib.rs:1691 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/ae046dd424d3cdbd.
Report an issue: GitHub.
Appendix: source
Thrown at packages/fullstack-macro/src/lib.rs:1691
return Err(lookahead.error());
}
} else {
let value = key_or_value;
if use_key_and_value {
return Err(syn::Error::new(
value.span(),
"positional argument follows keyword argument",
));
}
if arg_pos == 1 {
struct_name = Some(value)
} else {
return Err(syn::Error::new(value.span(), "expected string literal"));
}
}
} else if lookahead.peek(LitStr) {
if use_key_and_value {
return Err(syn::Error::new(
stream.span(),
"If you use keyword arguments (e.g., `name` = \
Something), then you can no longer use arguments \
without a keyword.",
));
}
match arg_pos {
1 => return Err(lookahead.error()),
2 => prefix = Some(stream.parse()?),
3 => encoding = Some(stream.parse()?),
4 => fn_path = Some(stream.parse()?),
_ => return Err(syn::Error::new(stream.span(), "unexpected extra argument")),
}
} else {
return Err(lookahead.error());
}
if !stream.is_empty() {View on GitHub (pinned to 24f6a829df)