DioxusLabs/dioxus · error · syn::Error
Failed emit valid rsx - likely due to partially complete exp
Error message
Failed emit valid rsx - likely due to partially complete expressions in the rsx! macro
What it means
Error "Failed emit valid rsx - likely due to partially complete expressions in the rsx! macro" thrown in DioxusLabs/dioxus.
Source
Thrown at packages/autofmt/src/lib.rs:102
// this macro is inside the last macro we parsed, skip it
if macro_path.span().start() < end_span {
continue;
}
let body = item.parse_body_with(CallBody::parse_strict)?;
let rsx_start = macro_path.span().start();
writer.out.indent_level = writer
.out
.indent
.count_indents(writer.src.get(rsx_start.line - 1).unwrap_or(&""));
// TESTME
// Writing *should* not fail but it's possible that it does
if writer.write_rsx_call(&body).is_err() {
let span = writer.invalid_exprs.pop().unwrap_or_else(Span::call_site);
return Err(syn::Error::new(
span,
"Failed emit valid rsx - likely due to partially complete expressions in the rsx! macro",
));
}
// writing idents leaves the final line ended at the end of the last ident
if writer.out.buf.contains('\n') {
_ = writer.out.new_line();
_ = writer.out.tab();
}
let span = item.delimiter.span().join();
let mut formatted = writer.out.buf.split_off(0);
let start = collect_macros::byte_offset(contents, span.start()) + 1;
let end = collect_macros::byte_offset(contents, span.end()) - 1;
// Rustfmt will remove the space between the macro and the opening paren if the macro is a single expression
let body_is_solo_expr = body.body.roots.len() == 1View on GitHub (pinned to 393d190a80)
When it happens
Trigger: Thrown at packages/autofmt/src/lib.rs:102 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/c38d8b188011d438.
Report an issue: GitHub.