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

macros: render more comprehensible documentation for select! #6468

Merged
merged 2 commits into from
Apr 6, 2024

Conversation

dtolnay
Copy link
Contributor

@dtolnay dtolnay commented Apr 6, 2024

Motivation

Screenshot from 2024-04-06 15-16-57

Solution

Screenshot from 2024-04-06 15-17-10

@Darksonn Darksonn added T-docs Topic: documentation A-tokio Area: The main tokio crate M-macros Module: macros in the main Tokio crate labels Apr 6, 2024
@Darksonn
Copy link
Contributor

Darksonn commented Apr 6, 2024

Looks sensible. Thanks! Does this hide docs from ide tooltips?

Rendered docs.

tokio/src/macros/select.rs Outdated Show resolved Hide resolved
@dtolnay
Copy link
Contributor Author

dtolnay commented Apr 6, 2024

Does this hide docs from ide tooltips?

Yes, seems it does. Good call.

I found a way to fix it.

Copy link
Contributor

@Darksonn Darksonn 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 the doc improvement! Looks good to me.

The extra indentation is unfortunate, but oh well.

@Darksonn Darksonn enabled auto-merge (squash) April 6, 2024 22:45
auto-merge was automatically disabled April 6, 2024 22:45

Head branch was pushed to by a user without write access

@dtolnay
Copy link
Contributor Author

dtolnay commented Apr 6, 2024

In fact the extra indentation wrecked the docs, too.

image

I pushed a different approach without indentation, that rustfmt is still okay with.

@Darksonn Darksonn enabled auto-merge (squash) April 6, 2024 22:48
@Darksonn
Copy link
Contributor

Darksonn commented Apr 6, 2024

Good catch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate M-macros Module: macros in the main Tokio crate T-docs Topic: documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants