DioxusLabs/dioxus · error · syn::Error
Query segments should be non-empty
Error message
Query segments should be non-empty
What it means
Error "Query segments should be non-empty" thrown in DioxusLabs/dioxus.
Source
Thrown at packages/router-macro/src/query.rs:78
let ty = if let Some((_, ty)) = field {
ty.clone()
} else {
return Err(syn::Error::new(
route_span,
format!("Could not find a field with the name '{}'", query_ident),
));
};
Ok(QuerySegment::Single(FullQuerySegment {
ident: query_ident,
ty,
}))
} else {
let mut query_arguments = Vec::new();
for segment in query.split('&') {
if segment.is_empty() {
return Err(syn::Error::new(
route_span,
"Query segments should be non-empty",
));
}
if let Some(query_argument) = segment.strip_prefix(':') {
let query_ident = Ident::new(query_argument, proc_macro2::Span::call_site());
let field = fields.find(|(name, _)| *name == &query_ident);
let ty = if let Some((_, ty)) = field {
ty.clone()
} else {
return Err(syn::Error::new(
route_span,
format!("Could not find a field with the name '{}'", query_ident),
));
};
query_arguments.push(QueryArgument {View on GitHub (pinned to 393d190a80)
When it happens
Trigger: Thrown at packages/router-macro/src/query.rs:78 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of DioxusLabs/dioxus@393d190a80 (2026-08-16).
Data as JSON: /api/errors/5fed88ba283c7032.
Report an issue: GitHub.