Skip to content

Conversation

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 11, 2021
@GuillaumeGomez
Copy link
Member

I am personally strongly in favour of this change, however it's not "small" so maybe we should ensure that the team agrees with this change before approving it? I opened a discussion on zulip here.

@jyn514 jyn514 changed the title Remove link on slice brackets Rustdoc: Remove link on slice brackets Dec 11, 2021
@jyn514 jyn514 added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Dec 11, 2021
@jyn514
Copy link
Member

jyn514 commented Dec 12, 2021

I don't think it's clear that this is an improvement; since rustdoc has the feature for ages I think we should lean on the side of not changing it.

@jsha jsha closed this Dec 13, 2021
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Jun 14, 2022
…, r=jsha

rustdoc:  remove link on slice brackets

This is rust-lang#91778, take two.

Fixes rust-lang#91173

The reason I'm reevaluating this change is rust-lang#97668, which makes fully-generic slices link to the slice docs page. This fixes some downsides in the original PR, where `Box<[T]>`, for example, was not linked to the primitive.slice.html page. In this PR, the `[T]` inside is still a link.

The other major reason for wanting to reevaluate this is the changed color scheme. When this feature was first introduced in rustdoc, primitives were a different color from structs and enums. This way, eagle-eyed users could figure out that the square brackets were separate links from the structs inside. Now, all types have the same color, so a significant fraction of users won't even know the links are there unless they pay close attention to the status bar or use an accessibility tool that lists all links on the page.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Jun 14, 2022
…, r=jsha

rustdoc:  remove link on slice brackets

This is rust-lang#91778, take two.

Fixes rust-lang#91173

The reason I'm reevaluating this change is rust-lang#97668, which makes fully-generic slices link to the slice docs page. This fixes some downsides in the original PR, where `Box<[T]>`, for example, was not linked to the primitive.slice.html page. In this PR, the `[T]` inside is still a link.

The other major reason for wanting to reevaluate this is the changed color scheme. When this feature was first introduced in rustdoc, primitives were a different color from structs and enums. This way, eagle-eyed users could figure out that the square brackets were separate links from the structs inside. Now, all types have the same color, so a significant fraction of users won't even know the links are there unless they pay close attention to the status bar or use an accessibility tool that lists all links on the page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rustdoc: don't hyperlink square brackets in method signatures

4 participants