-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Unify generation of primitive links for associated types with the rest #114096
base: master
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
0bcb11a
to
a85fd33
Compare
Updated existing tests. |
This comment has been minimized.
This comment has been minimized.
a85fd33
to
cb8e20d
Compare
Correctly updated this time... |
This PR is removing a lot of links, and it results in array links that look like this:
That link is pretty hard to click, and its label is not very informative. I know you could get it to come up that way before, too, but if we're going to change these links again, I'd like to improve it by trying not to generate poor quality link text and link visualization. |
Good point. I'll remove this last link as well then. |
Removed link generation for arrays. |
☔ The latest upstream changes (presumably #114130) made this pull request unmergeable. Please resolve the merge conflicts. |
dd5170c
to
00644c3
Compare
Fixed merge conflict. |
I agree that this is weird, but previous discussions have shown that links to the slice and array pages, at least, are helpful (especially as “on-ramps”) It looks like this change removes all of the links to primitive.slice.html from function signatures. I’m not sure that’s a good idea. |
00644c3
to
68b4f85
Compare
I improved the current handling. You can test it here. I also updated the screenshot. So in short, I improved display of slice links and the reference links don't include the generic anymore. |
☔ The latest upstream changes (presumably #114905) made this pull request unmergeable. Please resolve the merge conflicts. |
68b4f85
to
1ef48b1
Compare
Fixed merge conflict. |
The sample docs at https://rustdoc.crud.net/imperio/generics-display/foo/trait.Trait.html still have a reference link, They also have |
That's what I originally wanted to fix. It was bugging me that
I think the problem here is that both links have the same color. They are different types and link to different items, therefore they should not point to the same page. |
One thing I thought that could improve greatly the situation for |
That would help with the click target problem. I’m not sure how to keep it from breaking the monospaced grid and looking weird.
Underlines won’t be helpful on touch, and even with a mouse it’s not great to rely on that. I honestly feel kind of trapped here, because all of the options I can think of have serious downsides.
|
☔ The latest upstream changes (presumably #116230) made this pull request unmergeable. Please resolve the merge conflicts. |
Ping from triage, @GuillaumeGomez any updates on resolving the conflicts? Thanks! |
It is very weird to have this display:
Where you have
&Rhs
actually linking to the reference primitive. I think it'd be better to unify the behaviour with the other items (non-generics ones).For some history, it was changed this way in #107244 to prevent having some symbols linking to different pages than the item following them.
It now looks like this:
r? @notriddle