{"record":{"id":"78e2e6ded17f1d80","repo":"tracel-ai/burn","slug":"push-combined-should-only-be-called-on-a-paramgr","errorCode":null,"errorMessage":"`push_combined` should only be called on a ParamGroupMatcher::Combined variant.","messagePattern":"`push_combined` should only be called on a ParamGroupMatcher::Combined variant\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/burn-core/src/module/param/group.rs","lineNumber":316,"sourceCode":"            ParamGroupMatcher::Combined(param_group_matchers) => match other.clone() {\n                ParamGroupMatcher::All => Self::All,\n                ParamGroupMatcher::Explicit(_) => {\n                    let mut matchers = (*param_group_matchers).clone();\n                    matchers.push(other);\n                    Self::Combined(Arc::new(matchers))\n                }\n                ParamGroupMatcher::Path(_) => {\n                    let mut matchers = (*param_group_matchers).clone();\n                    matchers.push(other);\n                    Self::Combined(Arc::new(matchers))\n                }\n                ParamGroupMatcher::Combined(other_matchers) => {\n                    let mut matchers = (*param_group_matchers).clone();\n                    matchers.append(&mut (*other_matchers).clone());\n                    Self::Combined(Arc::new(matchers))\n                }\n            },\n            _ => panic!(\n                \"`push_combined` should only be called on a ParamGroupMatcher::Combined variant.\"\n            ),\n        }\n    }\n\n    pub(crate) fn fuse(self, other: &Self) -> Self {\n        match (self.clone(), other.clone()) {\n            (ParamGroupMatcher::All, _) => Self::All,\n            (_, ParamGroupMatcher::All) => Self::All,\n            (ParamGroupMatcher::Explicit(_), ParamGroupMatcher::Combined(_)) => {\n                other.clone().push_combined(self)\n            }\n            (ParamGroupMatcher::Path(_), ParamGroupMatcher::Combined(_)) => {\n                other.clone().push_combined(self)\n            }\n            (ParamGroupMatcher::Combined(_), ParamGroupMatcher::Explicit(_)) => {\n                self.push_combined(other.clone())\n            }","sourceCodeStart":298,"sourceCodeEnd":334,"githubUrl":"https://github.com/tracel-ai/burn/blob/d16f7ba2ed0d41408189384044cc886fb4c8f957/crates/burn-core/src/module/param/group.rs#L298-L334","documentation":"Internal enum-dispatch invariant: `push_combined` on `ParamGroupMatcher` assumes `self` is the `Combined` variant (it is called from `fuse` after matching on `Combined`). The panic fires if the method is invoked on an `All`, `Explicit`, or `Path` matcher — a caller-side misuse of the matcher API that indicates a broken fusion of two parameter-group matchers.","triggerScenarios":"Thrown at crates/burn-core/src/module/param/group.rs:316 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Only call `push_combined` on a matcher known to be `ParamGroupMatcher::Combined` (e.g. match and destructure first).","Use the public `fuse`/merge entry point, which handles all matcher variants, instead of `push_combined` directly.","If a non-Combined matcher must grow, construct a new `Combined` matcher wrapping it plus the new element."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d16f7ba2ed0d41408189384044cc886fb4c8f957","analyzedAt":"2026-09-05T13:19:14.260Z","contentChangedAt":"2026-09-05T13:19:14.260Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}