rust-lang / rust-lang/rust

Rustdoc does not show more of the item summary if there is enough room for it

Open
#145,509 0 comments 1 reaction 1 assignee View on GitHub

@lolbinarycat is already working on this.

Since Aug 24, 2025.

A-rustdoc-search A-rustdoc-ui C-bug T-rustdoc T-rustdoc-frontend
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Code

/// some really long summary paragraph that doesn't fit on one screen at all and will be truncated.
pub fn foo() {}

Reproduction Steps

  • document the crate and open it (via cargo doc --open or directly via rustdoc)
  • search "foo"
  • zoom out
  • collapse sidebar
  • in firefox, make sure "Zoom text only" is enabled

Expected Outcome

All of the extra space means the summary paragraph is visible now.

Actual Output

still an ellipsis.

Image

Version

rustdoc 1.90.0-nightly (9748d87dc 2025-07-21)

Additional Details

grid-template-columns generally seems to be given very rough values that do not adapt very well to different screen sizes. This applies both in search results and also to the module pages to some extent.

I used calc(min(33%, 20em)) auto which seemed to work better for large screen sizes while also working the same for small screens.

The search results page adds a hard ellipsis using js instead of using text-overflow: elipsis (which I usually dislike but I think is the correct thing to use here)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.