-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustdoc doesn't include all text that cross attribute type boundaries in the summary #85763
Comments
This seems to be achieved here: rust/src/librustdoc/clean/types.rs Line 1060 in 1639a16
We're concatenating the text from doc attrs here, but only until we find one of a different kind. Seems intentional enough but I don't know what it's for. To me naively it only makes sense to concatenate single-line doc comments to generate the summary; with either multiline doc comments or explicit attrs I would expect that where they end is a good place to end the summary. |
My usecase is dynamically generating some words in the first sentence based on |
Right, that's a compelling use case for sure! My take was "separate attributes are probably intended as separate paragraphs", but I didn't consider that you'd dynamically construct the set of attributes. I'm curious if that was the original motivation for the |
however, they're not treated as separate paragraphs, in the full docs, it is one paragraph. in my experience, the main use for if anything, we should just ingest |
Rollup of 3 pull requests Successful merges: - rust-lang#131080 (Stabilize WebAssembly `multivalue`, `reference-types`, and `tail-call` target features) - rust-lang#132871 (add regression test for rust-lang#85763) - rust-lang#132878 (triagebot: Assign rustdoc tests to T-rustdoc.) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#132871 - lolbinarycat:rustdoc-heterogeneous-first-paragraph-85763, r=aDotInTheVoid add regression test for rust-lang#85763 closes rust-lang#85763
…-first-paragraph-85763, r=aDotInTheVoid add regression test for rust-lang#85763 closes rust-lang#85763
Rollup of 3 pull requests Successful merges: - rust-lang#131080 (Stabilize WebAssembly `multivalue`, `reference-types`, and `tail-call` target features) - rust-lang#132871 (add regression test for rust-lang#85763) - rust-lang#132878 (triagebot: Assign rustdoc tests to T-rustdoc.) r? `@ghost` `@rustbot` modify labels: rollup
I tried this code:
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"
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: