{"record":{"id":"de09039792cfe4dc","repo":"rust-lang/cargo","slug":"not-implemented","errorCode":null,"errorMessage":"not implemented","messagePattern":"not implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/mdman/src/format/man.rs","lineNumber":174,"sourceCode":"                        Tag::Item => {\n                            // Note: This uses explicit movement instead of .IP\n                            // because the spacing on .IP looks weird to me.\n                            // space down, indent 4\n                            self.flush();\n                            self.output.push_str(\".sp\\n.RS 4\\n\");\n                            match list.last_mut().expect(\"item must have list start\") {\n                                // Ordered list.\n                                Some(n) => {\n                                    // move left 4, output the list index number, move right 1.\n                                    write!(self.output, \"\\\\h'-04' {}.\\\\h'+01'\", n)?;\n                                    *n += 1;\n                                }\n                                // Unordered list.\n                                None => self.output.push_str(\"\\\\h'-04'\\\\(bu\\\\h'+03'\"),\n                            }\n                            suppress_paragraph = true;\n                        }\n                        Tag::FootnoteDefinition(_label) => unimplemented!(),\n                        Tag::Table(alignment) => {\n                            // Table start\n                            // allbox = draw a box around all the cells\n                            // tab(:) = Use `:` to separate cell data (instead of tab)\n                            // ; = end of options\n                            self.output.push_str(\n                                \"\\n.TS\\n\\\n                                allbox tab(:);\\n\",\n                            );\n                            let alignments: Vec<_> = alignment\n                                .iter()\n                                .map(|a| match a {\n                                    Alignment::Left | Alignment::None => \"lt\",\n                                    Alignment::Center => \"ct\",\n                                    Alignment::Right => \"rt\",\n                                })\n                                .collect();\n                            self.output.push_str(&alignments.join(\" \"));","sourceCodeStart":156,"sourceCodeEnd":192,"githubUrl":"https://github.com/rust-lang/cargo/blob/eb98b54bc9f3c74519f43d066cb3fd02ebc88df0/crates/mdman/src/format/man.rs#L156-L192","documentation":"mdman converts Markdown into man-page (troff) format. When it encounters a footnote definition block (Tag::FootnoteDefinition) in the Markdown event stream, it has no man-page equivalent implemented and calls unimplemented!(), which panics with 'not implemented'. Footnotes have no direct troff/man rendering path in this formatter.","triggerScenarios":"Running mdman to generate a man page from a Markdown source that contains a footnote definition, e.g. `[^1]: some text`. The pulldown-cmark parser emits Tag::FootnoteDefinition and the man formatter hits the unimplemented arm.","commonSituations":"Authors writing CLI tool docs add footnotes for citations/notes; running `mdman --format man` on such a file crashes. Mirrors of upstream docs that use footnotes also trip this.","solutions":["Remove all footnote definitions (`[^id]: ...`) from the Markdown source before passing it to mdman.","Inline the footnote text as a regular paragraph or a 'Notes' section in the man page source.","If footnote support is required, implement a troff rendering for Tag::FootnoteDefinition in crates/mdman/src/format/man.rs (e.g. emit an .SH NOTES section) instead of unimplemented!()."],"exampleFix":"// before\nTag::FootnoteDefinition(_label) => unimplemented!(),\n// after\nTag::FootnoteDefinition(_label) => {\n    // footnotes are dropped for man output\n}","handlingStrategy":"validation","validationCode":"// Before invoking mdman, scan the source for footnote definitions\nlet src = std::fs::read_to_string(&md_path)?;\nif src.lines().any(|l| l.trim_start().starts_with(\"[^\") && l.contains(\"]:\")) {\n    anyhow::bail!(\"source contains footnote definitions unsupported by mdman man output\");\n}","typeGuard":"null","tryCatchPattern":"null","preventionTips":["Keep man-page Markdown sources free of footnotes.","Run mdman on a sanitized copy of docs that strips footnotes."],"tags":["mdman","man-page","markdown","footnote","panic"],"backgroundTag":null,"analyzedSha":"eb98b54bc9f3c74519f43d066cb3fd02ebc88df0","analyzedAt":"2026-08-11T17:42:36.556Z","contentChangedAt":"2026-08-11T17:42:36.556Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}