{"record":{"id":"b324a65ca9a837ae","repo":"DioxusLabs/dioxus","slug":"catch-all-segments-are-not-allowed-in-nests","errorCode":null,"errorMessage":"Catch all segments are not allowed in nests","messagePattern":"Catch all segments are not allowed in nests","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/router-macro/src/route_tree.rs","lineNumber":175,"sourceCode":"                                },\n                                index,\n                            };\n\n                            // If it doesn't, add the segment to the current route\n                            let static_segment = self.entries.insert(static_segment);\n\n                            let current_children = current_route\n                                .map(|id| self.children_mut(id))\n                                .unwrap_or_else(|| &mut segments);\n                            current_children.push(static_segment);\n\n                            // Update the current route\n                            current_route = Some(static_segment);\n                        }\n                        // If there is a dynamic segment, stop adding static segments\n                        RouteSegment::Dynamic(..) => break,\n                        RouteSegment::CatchAll(..) => {\n                            unimplemented!(\"Catch all segments are not allowed in nests\")\n                        }\n                    }\n                }\n\n                // Add the nest to the current route\n                let nest = RouteTreeSegmentData::Nest {\n                    nest,\n                    children: Vec::new(),\n                };\n\n                let nest = self.entries.insert(nest);\n                let segments = match current_route.and_then(|id| self.get_mut(id)) {\n                    Some(RouteTreeSegmentData::Static { children, .. }) => children,\n                    Some(RouteTreeSegmentData::Nest { children, .. }) => children,\n                    Some(r) => {\n                        unreachable!(\"{current_route:?}\\n{r:?} is not a static or nest segment\",)\n                    }\n                    None => &mut segments,","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/router-macro/src/route_tree.rs#L157-L193","documentation":"The router macro found a catch-all (...) segment inside a nested route (nest). Catch-all segments can only appear at the top level of a route because a nest's children must remain routable; this validation fires while constructing the route tree.","triggerScenarios":"Thrown at packages/router-macro/src/route_tree.rs:175 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Catch-all segments cannot appear inside nests. Move the catch-all to the end of a top-level route."],"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"}