DioxusLabs/dioxus · error
expected `hot_reload_context = true` or `hot_reload_context
Error message
expected `hot_reload_context = true` or `hot_reload_context = false`
What it means
The optional trailing options in the element-definition macro were malformed: after an option identifier, a boolean literal is required. Only `hot_reload_context = true` or `hot_reload_context = false` is accepted.
Source
Thrown at packages/html-internal-macro/src/elements.rs:71
return Err(syn::Error::new(html_marker.span(), "expected `html`"));
}
input.parse::<Token![=]>()?;
let html_path = input.parse()?;
let mut hot_reload_context = false;
while input.peek(Token![,]) {
input.parse::<Token![,]>()?;
if input.peek(Token![;]) {
break;
}
let option: Ident = input.parse()?;
input.parse::<Token![=]>()?;
let enabled: LitBool = input.parse()?;
if option == "hot_reload_context" {
hot_reload_context = enabled.value;
} else {
return Err(syn::Error::new(
option.span(),
"expected `hot_reload_context = true` or `hot_reload_context = false`",
));
}
}
input.parse::<Token![;]>()?;
let mut gated_attribute_groups = Vec::new();
let mut explicit_gated_attribute_groups = false;
if !input.is_empty() {
let fork = input.fork();
if let Ok(marker) = fork.call(Ident::parse_any)
&& marker == "gated_attributes"
{
explicit_gated_attribute_groups = true;
let _marker: Ident = input.call(Ident::parse_any)?;
let content;View on GitHub (pinned to 24f6a829df)
Solutions
- Set hot_reload_context explicitly to either `true` or `false`, e.g. hot_reload_context = true.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/html-internal-macro/src/elements.rs:71 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/4f34e2639068adae.
Report an issue: GitHub.