{"record":{"id":"3ca05aec8d912b7a","repo":"DioxusLabs/dioxus","slug":"failed-to-parse-hash-fragments-must-be-in-the","errorCode":null,"errorMessage":"Failed to parse `:`. Hash fragments must be in the format '#:<field>'","messagePattern":"Failed to parse `:`\\. Hash fragments must be in the format '#:<field>'","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"packages/router-macro/src/hash.rs","lineNumber":44,"sourceCode":"        let ident = &self.ident;\n        quote! {\n            {\n                let __hash = #ident.to_string();\n                if !__hash.is_empty() {\n                    write!(f, \"#{}\", dioxus_router::exports::percent_encoding::utf8_percent_encode(&__hash, dioxus_router::exports::FRAGMENT_ASCII_SET))?;\n                }\n            }\n        }\n    }\n\n    pub fn parse_from_str<'a>(\n        route_span: proc_macro2::Span,\n        mut fields: impl Iterator<Item = (&'a Ident, &'a Type)>,\n        hash: &str,\n    ) -> syn::Result<Self> {\n        // check if the route has a hash string\n        let Some(hash) = hash.strip_prefix(':') else {\n            return Err(syn::Error::new(\n                route_span,\n                \"Failed to parse `:`. Hash fragments must be in the format '#:<field>'\",\n            ));\n        };\n\n        let hash_ident = Ident::new(hash, proc_macro2::Span::call_site());\n        let field = fields.find(|(name, _)| *name == &hash_ident);\n\n        let ty = if let Some((_, ty)) = field {\n            ty.clone()\n        } else {\n            return Err(syn::Error::new(\n                route_span,\n                format!(\"Could not find a field with the name '{}'\", hash_ident),\n            ));\n        };\n\n        Ok(Self {","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/393d190a801ccb441d41923e232289b4f8a5c669/packages/router-macro/src/hash.rs#L26-L62","documentation":"Error \"Failed to parse `:`. Hash fragments must be in the format '#:<field>'\" thrown in DioxusLabs/dioxus.","triggerScenarios":"Thrown at packages/router-macro/src/hash.rs:44 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"393d190a801ccb441d41923e232289b4f8a5c669","analyzedAt":"2026-08-16T11:27:45.815Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}