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: make item links consistently use title="{shortty} {path}" #107242

Merged
merged 1 commit into from
Jan 27, 2023

Conversation

notriddle
Copy link
Contributor

The ordering in item tables was flipped in 3030cbe, making it inconsistent with the ordering in method signatures.

Compare these (before this PR is merged):

title = [full_path(cx, myitem), myitem.type_().to_string()]
.iter()
.filter_map(|s| if !s.is_empty() { Some(s.as_str()) } else { None })
.collect::<Vec<_>>()
.join(" "),

r#"<a class="{}" href="{}" title="{} {}">{}</a>"#,
short_ty,
url,
short_ty,
join_with_double_colon(&fqp),
text.as_str()

@rustbot
Copy link
Collaborator

rustbot commented Jan 23, 2023

r? @jsha

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jan 23, 2023
@GuillaumeGomez
Copy link
Member

It indeed makes more sense, thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jan 26, 2023

📌 Commit 57ca368 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@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 26, 2023
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Jan 27, 2023
…, r=GuillaumeGomez

rustdoc: make item links consistently use `title="{shortty} {path}"`

The ordering in item tables was flipped in 3030cbe, making it inconsistent with the ordering in method signatures.

Compare these (before this PR is merged):

https://github.com/rust-lang/rust/blob/c8e6a9e8b6251bbc8276cb78cabe1998deecbed7/src/librustdoc/html/render/print_item.rs#L455-L459

https://github.com/rust-lang/rust/blob/c8e6a9e8b6251bbc8276cb78cabe1998deecbed7/src/librustdoc/html/format.rs#L903-L908
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 27, 2023
Rollup of 8 pull requests

Successful merges:

 - rust-lang#105784 (update stdarch)
 - rust-lang#106856 (core: Support variety of atomic widths in width-agnostic functions)
 - rust-lang#107171 (rustc_metadata: Fix `encode_attrs`)
 - rust-lang#107242 (rustdoc: make item links consistently use `title="{shortty} {path}"`)
 - rust-lang#107279 (Use new solver during selection)
 - rust-lang#107284 (rustdoc: use smarter encoding for playground URL)
 - rust-lang#107325 (rustdoc: Stop using `HirId`s)
 - rust-lang#107336 (rustdoc: remove mostly-unused CSS classes `import-item` and `module-item`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 1452414 into rust-lang:master Jan 27, 2023
@rustbot rustbot added this to the 1.69.0 milestone Jan 27, 2023
@notriddle notriddle deleted the notriddle/title-ordering branch January 27, 2023 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

5 participants