{"record":{"id":"32bcfaa7afead28c","repo":"DioxusLabs/dioxus","slug":"only-string-int-float-and-bool-literals-are-sup","errorCode":null,"errorMessage":"Only string, int, float, and bool literals are supported","messagePattern":"Only string, int, float, and bool literals are supported","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"packages/rsx/src/literal.rs","lineNumber":57,"sourceCode":"    Int(LitInt),\n\n    /// A bool literal\n    ///\n    /// true\n    Bool(LitBool),\n}\n\nimpl Parse for HotLiteral {\n    fn parse(input: ParseStream) -> syn::Result<Self> {\n        let raw = input.parse::<Lit>()?;\n\n        let value = match raw.clone() {\n            Lit::Int(a) => HotLiteral::Int(a),\n            Lit::Bool(a) => HotLiteral::Bool(a),\n            Lit::Float(a) => HotLiteral::Float(a),\n            Lit::Str(a) => HotLiteral::Fmted(IfmtInput::new_litstr(a)?.into()),\n            _ => {\n                return Err(syn::Error::new(\n                    raw.span(),\n                    \"Only string, int, float, and bool literals are supported\",\n                ));\n            }\n        };\n\n        Ok(value)\n    }\n}\n\nimpl ToTokens for HotLiteral {\n    fn to_tokens(&self, out: &mut proc_macro2::TokenStream) {\n        match &self {\n            HotLiteral::Fmted(f) => {\n                f.formatted_input.to_tokens(out);\n            }\n            HotLiteral::Float(f) => f.to_tokens(out),\n            HotLiteral::Int(f) => f.to_tokens(out),","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/rsx/src/literal.rs#L39-L75","documentation":"A literal used where the RSX hot-reload literal parser expects a hot-reloadable value is of an unsupported kind (e.g. a byte string or char literal). Only strings, integers, floats, and bools can be hot-reloaded.","triggerScenarios":"Thrown at packages/rsx/src/literal.rs:57 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use only string, integer, float, or boolean literals in this RSX position; other literal kinds (chars, byte strings, etc.) are not supported."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24f6a829df0dfa203961a98ea4cae21c2ff27e28","analyzedAt":"2026-08-23T07:10:14.078Z","contentChangedAt":"2026-08-23T07:10:14.078Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}