{"record":{"id":"65e018aa3ba2316b","repo":"rust-lang/rust","slug":"list-continuation-unexpectedly-terminated","errorCode":null,"errorMessage":"list continuation unexpectedly terminated","messagePattern":"list continuation unexpectedly terminated","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/tools/rust-analyzer/xtask/src/publish/notes.rs","lineNumber":106,"sourceCode":"        let mut nesting = ListNesting::default();\n        while let Some(line) = self.iter.peek() {\n            let line = line.as_deref().map_err(|e| anyhow!(\"{e}\"))?;\n\n            if get_list_item(line).is_some() {\n                let line = self.iter.next().unwrap()?;\n                let line = process_inline_macros(&line)?;\n                let (marker, item) = get_list_item(&line).unwrap();\n                nesting.set_current(marker);\n                self.write_list_item(item, &nesting);\n                self.process_paragraph(nesting.indent(), |line| {\n                    line.is_empty() || get_list_item(line).is_some() || line == \"+\"\n                })?;\n            } else if line == \"+\" {\n                let _ = self.iter.next().unwrap()?;\n                let line = self\n                    .iter\n                    .peek()\n                    .ok_or_else(|| anyhow!(\"list continuation unexpectedly terminated\"))?;\n                let line = line.as_deref().map_err(|e| anyhow!(\"{e}\"))?;\n\n                let indent = nesting.indent();\n                if line.starts_with('[') {\n                    self.write_line(\"\", 0);\n                    self.process_source_code_block(indent)?;\n                } else if line.starts_with(LISTING_DELIMITER) {\n                    self.write_line(\"\", 0);\n                    self.process_listing_block(None, indent)?;\n                } else if line.starts_with('.') {\n                    self.write_line(\"\", 0);\n                    self.process_block_with_title(indent)?;\n                } else if line.starts_with(IMAGE_BLOCK_PREFIX) {\n                    self.write_line(\"\", 0);\n                    self.process_image_block(None, indent)?;\n                } else if line.starts_with(VIDEO_BLOCK_PREFIX) {\n                    self.write_line(\"\", 0);\n                    self.process_video_block(None, indent)?;","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/rust-lang/rust/blob/7088e4b63a9516ebfbfe2ab2d999cf01a528ac14/src/tools/rust-analyzer/xtask/src/publish/notes.rs#L88-L124","documentation":"Returned by the release-notes parser when a `+` list-continuation marker is followed by end-of-input — the parser peek()s for the continued block (source block, listing, title, image, etc.) but the iterator is empty, so there is nothing to continue.","triggerScenarios":"Running the publish/notes xtask on a changelog/release-notes Markdown file where a list item ends with a bare `+` on the last line (no following block). The AsciiDoc-style continuation expects content after it.","commonSituations":"Editing the release notes and leaving a dangling `+` at the end of the file; a merge that truncated the notes; copy-paste that dropped the block following the continuation marker.","solutions":["Open the notes file and remove the trailing `+` or add the block it was meant to continue.","Run the parser on the file standalone to get the line number, then fix that line.","Add a lint/test that rejects a file ending in a continuation marker."],"exampleFix":"<!-- before: notes.md ends with a dangling continuation -->\n* Some bullet\n+ <!-- nothing follows; EOF -->\n\n<!-- after: either drop the marker or supply the block -->\n* Some bullet\n+\n----\ncode block content\n----","handlingStrategy":"validation","validationCode":"// Reject release notes that end in a dangling continuation before running publish:\nfn ends_cleanly(text: &str) -> bool {\n    let trimmed = text.trim_end();\n    !trimmed.ends_with('\\n+') && !trimmed.ends_with('+')\n}","typeGuard":"null","tryCatchPattern":"match publish::notes::parse(&notes) {\n    Ok(out) => Ok(out),\n    Err(e) if e.to_string().contains(\"list continuation\") => {\n        eprintln!(\"notes file has a dangling `+`; remove it or add the block it continues\");\n        Err(e)\n    }\n    Err(e) => Err(e),\n}","preventionTips":["Never leave a trailing `+` in release notes.","Add a CI lint that rejects files ending in a continuation marker.","Run the notes parser locally before the publish xtask."],"tags":["rust-analyzer","xtask","publish","parser","release-notes"],"backgroundTag":null,"analyzedSha":"7088e4b63a9516ebfbfe2ab2d999cf01a528ac14","analyzedAt":"2026-08-10T14:17:03.603Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}