Skip to content

rustdoc doesn't include all text that cross attribute type boundaries in the summary #85763

Closed
@Nemo157

Description

@Nemo157

I tried this code:

#[doc = " Some text"]
#[doc = " that should"]
/// be concatenated.
pub fn main() {
    println!("Hello, world!");
}

I expected to see this happen: The entire first paragraph is used as the summary for the function in the module docs: "Some text that should be concatenated"

Instead, this happened: Only the unsugared doc attributes are used: "Some text that should"

image

image

Meta

rustc --version --verbose:

rustc 1.54.0-nightly (4e3e6db01 2021-05-18)
binary: rustc
commit-hash: 4e3e6db011c5b482d2bef8ba02274657f93b5e0d
commit-date: 2021-05-18
host: x86_64-unknown-linux-gnu
release: 1.54.0-nightly
LLVM version: 12.0.1

Metadata

Metadata

Assignees

Labels

A-rustdoc-uiArea: Rustdoc UI (generated HTML)C-bugCategory: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions