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: Add missing dot separator #92937

Merged
merged 2 commits into from
Jan 17, 2022
Merged

Conversation

GuillaumeGomez
Copy link
Member

Fixes #92901.

Screenshot from 2022-01-15 17-47-18

r? @jsha

@GuillaumeGomez GuillaumeGomez added the A-rustdoc-ui Area: rustdoc UI (generated HTML) label Jan 15, 2022
@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jan 15, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 15, 2022
Copy link
Contributor

@jsha jsha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing! I was just about to start working on this.

// @has - '//div[@id="implementors-list"]//*[@class="rightside"]' '4.0 · source'

// @has foo/struct.Foo.html
// @has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0· source · '
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a missing space here.

Suggested change
// @has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0· source · '
// @has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0 · source · '

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, there isn't (otherwise the test would fail). :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With an image you'll understand better what's happening:

Screenshot from 2022-01-16 17-46-31

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, got it. It looks like there's a missing-space problem in the templates, but it's papered over by padding. I'll fix in a followup PR.

#![feature(staged_api)]

// @has foo/trait.Bar.html
// @has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0· source · '
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a missing space here.

Suggested change
// @has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0· source · '
// @has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0· source · '

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsha I think you forgot to add the space in your suggestion.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same answer as above.

@jsha
Copy link
Contributor

jsha commented Jan 15, 2022

By the way, do we need to worry about the case where there's no source available? I think not because the version numbers are only shown in the stdlib.

@camelid camelid changed the title Dot separator rustdoc: Add missing dot separator Jan 15, 2022
@GuillaumeGomez
Copy link
Member Author

That is a very good point. I'll open an issue in case source isn't displayed and do it tomorrow.

@jsha
Copy link
Contributor

jsha commented Jan 16, 2022

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jan 16, 2022

📌 Commit 75967ce has been approved by jsha

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 16, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 17, 2022
…askrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#92795 (Link sidebar "location" heading to top of page)
 - rust-lang#92799 (Remove some unnecessary uses of `FieldDef::ident`)
 - rust-lang#92808 (Fix `try wrapping expression in variant` suggestion with struct field shorthand)
 - rust-lang#92819 (rustdoc: remove hand-rolled isatty)
 - rust-lang#92876 (Fix suggesting turbofish with lifetime arguments)
 - rust-lang#92921 (Rename Printer constructor from mk_printer() to Printer::new())
 - rust-lang#92937 (rustdoc: Add missing dot separator)
 - rust-lang#92953 (Copy an example to PartialOrd as well)
 - rust-lang#92977 (Docs: recommend VecDeque instead of Vec::remove(0))
 - rust-lang#92981 (fix const_ptr_offset_from tracking issue)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 0aae1ec into rust-lang:master Jan 17, 2022
@rustbot rustbot added this to the 1.60.0 milestone Jan 17, 2022
@GuillaumeGomez GuillaumeGomez deleted the dot-separator branch January 17, 2022 12:11
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) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rustdoc: source and since not separated by a dot on trait page
6 participants