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

Add trait object safety information on trait documentation page #89553

Closed

Conversation

GuillaumeGomez
Copy link
Member

Fixes #85138.

It looks like this:

Screenshot from 2021-10-05 12-42-18

So now, what remains to be done is debating over the appearance of the information.

r? @jsha

@GuillaumeGomez GuillaumeGomez added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-rustdoc-ui Area: rustdoc UI (generated HTML) labels Oct 5, 2021
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 5, 2021
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@jsha
Copy link
Contributor

jsha commented Oct 5, 2021

Thanks for working on this! Two issues:

  • This puts the "this trait is object safe" text in a very high-priority place, right at the very top of each trait page. But it's relatively low-priority information: most uses of traits are not using trait objects. Also, putting it at the top of so many trait pages will make beginners feel like they need to learn about trait objects and object safety right away, even though they are an intermediate-skill part of the language.

  • We put English text in the UI, which I think is fine for now - i18n would be a big project. But there are relatively few places we inject English text into the documentation itself. The main place I can think of is #[non_exhaustive], and I've seen some interest in changing that to just be a link to the doc page that explains the non_exhaustive attribute. An issue with injecting English text in the documentation is that it may be jarring when the rest of the documentation is non-English.

Let's brainstorm some more UI over in the issue thread.

@JohnCSimon
Copy link
Member

triage: Looks like this is waiting on author
@rustbot label: +S-waiting-on-author -S-waiting-on-review

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 24, 2021
@GuillaumeGomez
Copy link
Member Author

This is definitely not. We didn't take time to talk about it yet. It's blocked instead.

@GuillaumeGomez GuillaumeGomez added I-needs-decision Issue: In need of a decision. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 25, 2021
@camelid camelid added the S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). label Oct 31, 2021
@bors
Copy link
Contributor

bors commented Sep 20, 2022

☔ The latest upstream changes (presumably #102061) made this pull request unmergeable. Please resolve the merge conflicts.

@JohnCSimon
Copy link
Member

@GuillaumeGomez
Ping from triage: I'm closing this due to inactivity, Please reopen when you are ready to continue with this.
Note: if you do please open the PR BEFORE you push to it, else you won't be able to reopen - this is a quirk of github.
Thanks for your contribution.

@rustbot label: +S-inactive

@JohnCSimon JohnCSimon closed this Nov 27, 2022
@rustbot rustbot added the S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. label Nov 27, 2022
@GuillaumeGomez GuillaumeGomez deleted the trait-object-safe branch August 19, 2024 12:23
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) I-needs-decision Issue: In need of a decision. S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). 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.

Show whether a trait is object-safe on its document page
8 participants