Skip to content
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 outputs text too large for text box #90351

Closed
IsaccBarker opened this issue Oct 27, 2021 · 5 comments
Closed

rustdoc outputs text too large for text box #90351

IsaccBarker opened this issue Oct 27, 2021 · 5 comments
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@IsaccBarker
Copy link

Problem

I created a crate with a file that is included at compile time with include_str!. When I generated the docs, I found that the file content was also printed in the documentation, and since it was rather long, it exceeded the dialog box.

Steps

  1. Include a file in a crate, that is contained within a global constant
  2. Generate the documentation
  3. Navigate to the documentation, and see roughly was is in the attached image.

Possible Solution(s)

No response

Notes

Link to image.

Version

cargo 1.55.0 (32da73ab1 2021-08-23)
release: 1.55.0
commit-hash: 32da73ab19417aa89686e1d85c1440b72fdf877d
commit-date: 2021-08-23
@ehuss ehuss transferred this issue from rust-lang/cargo Oct 27, 2021
@ehuss
Copy link
Contributor

ehuss commented Oct 27, 2021

Transferred to rust-lang/rust, as rustdoc issues are tracked here.

@ehuss ehuss added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Oct 27, 2021
@jyn514 jyn514 added A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-bug Category: This is a bug. labels Oct 28, 2021
@jyn514
Copy link
Member

jyn514 commented Oct 28, 2021

I think we should consider omitting any text that would overflow the code block altogether. I'm not sure of a good syntax for that though; "struct VertexOutput { ..." makes it look like the ... is part of the string itself, not a meta-syntax added by rustdoc.

@IsaccBarker
Copy link
Author

IsaccBarker commented Oct 28, 2021

Could the offending text be replaced with omitted, but italicized?

It wouldn't look like part of the string because it's not surrounded by quotes (and in the case of globals it's not capitalized, not to mention you can't have an italic string like that).

@jyn514 jyn514 changed the title Cargo Doc outputs text too large for text box rustdoc outputs text too large for text box Nov 30, 2021
@jsha
Copy link
Contributor

jsha commented Dec 15, 2021

@IsaccBarker I see you're running cargo 1.55.0 (32da73ab1 2021-08-23). @GuillaumeGomez recently landed some fixes for long names: #90018. Does that fix the issue?

@GuillaumeGomez
Copy link
Member

Screenshot from 2022-02-15 14-24-24

It seems to be fixed so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants