Change:
Hi, I've just published a new version of my crate and the generated documentation is including a lot of bullet points that have never been included before. When I generate the docs locally on the 1.8.1 source code using the latest stable version of rust I see the same formatting for the 1.8.0 that generated, so I think this is a bug that's slipped into the nightly version of Stable local docs: ! ! My guess is that it's because I'm using block comments, the unwanted bullet points seem to match up with empty lines in the documentation comment which consist of just a . Thanks
Seems potentially related to , but the latest builds were from a nightly that should have that fixed in; cc you probably have some idea on where the issue is.
This is highly surprising indeed. Can you run with the last nightly locally and tell us if it reproduces the bug please? If so, I'll try to check what's wrong in rustdoc.
I have ran cargo doc on the latest nightly locally (nightly-x86_64-unknown-linux-gnu rustc 1.60.0-nightly ( 2022-01-20)) and it has reproduced the bug - I see the same generated docs as from the build.
It'll be fixed by
Thanks, is there any way I can get to rebuild the docs for the affected versions or will I have to submit a new version of my library to get a fixed build?
Sure. But that for that, please open an issue on repository directly.

Discussion:
if i != 0 || j != lines.len() { Some((i, j)) } else { None } } <del> fn get_horizontal_trim(lines: &[&str], kind: CommentKind) -> Option<usize> { </del> <ins> fn get_horizontal_trim<'a>(lines: &'a [&str], kind: CommentKind) -> Option<String> { </ins> let mut i = usize::MAX; let mut first = true;

// present. However, we first need to strip the empty lines so they don't get in the middle // when we try to compute the "horizontal trim". let lines = if kind == CommentKind::Block { <del> let mut i = 0; </del> <ins> // Whatever happens, we skip the first line. let mut i = if lines[0].trim_start().starts_with('*') { 0 } else { 1 }; </ins> let mut j = lines.len(); while i < j && lines[i].trim().is_empty() {

return None; } } <del> Some(i) </del> <ins> if lines.is_empty() { None } else { Some(lines[0][..i].into()) } </ins> } let data_s = data.as_str();

changes = true; // remove a "[ t]**" block from each line, if possible for line in lines.iter_mut() { <del> if horizontal + 1 < line.len() { *line = &line[horizontal + 1..]; </del> <ins> if let Some(tmp) = line.strip_prefix(&horizontal) { *line = tmp; if kind == CommentKind::Block && (*line == "*" || line.starts_with("* ") || line.starts_with("**")) { *line = &line[1..]; } </ins> } } }

create_default_session_globals_then(|| { let comment = "n let a: *i32;n *a = 5;n"; let stripped = beautify_doc_string(Symbol::intern(comment), CommentKind::Block); <del> assert_eq!(stripped.as_str(), " let a: *i32;n *a = 5;"); </del> <ins> assert_eq!(stripped.as_str(), "let a: *i32;n*a = 5;"); </ins> }) }

assert_eq!(stripped.as_str(), "!test"); }) } <ins> #[test] fn test_doc_blocks() { create_default_session_globals_then(|| { let stripped = beautify_doc_string(Symbol::intern(" # Returnsn     *n     "), CommentKind::Block); assert_eq!(stripped.as_str(), " # Returnsnn"); let stripped = beautify_doc_string( Symbol::intern("n     * # Returnsn     *n     "), CommentKind::Block, ); assert_eq!(stripped.as_str(), " # Returnsnn"); let stripped = beautify_doc_string(Symbol::intern("n *     an "), CommentKind::Block); assert_eq!(stripped.as_str(), "     an"); }) } </ins>

<ins> // check-pass // compile-flags:--test // This test ensures that no code block is detected in the doc comments. pub mod Wormhole { /** # Returns * */ pub fn foofoo() {} /** * # Returns * */ pub fn barbar() {} } </ins>

<ins> running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s </ins>

#![crate_name = "foo"] <del> // The goal of this test is to answer that it won't be generated as a list because </del> <ins> // The goal of this test is to ensure that it won't be generated as a list because </ins> // block doc comments can have their lines starting with a star. // @has foo/fn.foo.html