-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Update docs for impl keyword #136354
Update docs for impl keyword #136354
Conversation
r? @ibraheemdev rustbot has assigned @ibraheemdev. Use |
This comment has been minimized.
This comment has been minimized.
library/std/src/keyword_docs.rs
Outdated
/// * An `impl` block is an item that is used to implement some functionality for a type. | ||
/// * An `impl Trait` in a type-position can be used to designate a type that implements a trait called `Trait`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rustdoc tries its hardest to turn the first paragraph into a summary line that is used in the search results (and on module overview pages (not applicable here)).
In this case the list items are strung together without any separator (which looks like … type.An …). Arguably rustdoc could do better here and add an extra space.
Still, I think this should have a designated / proper summary line (for the search result page). Starting things off with a list instead of prose is generally slightly unusual independent of that I'd say.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good points. I've added back a summary line and an introduction for the list.
r=me after the nit. |
Thanks. @bors r+ |
@bors rollup |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#135285 (it-self → itself, build-system → build system, type-alias → type alias) - rust-lang#135677 (Small `rustc_resolve` cleanups) - rust-lang#136239 (show supported register classes in error message) - rust-lang#136246 (include note on variance and example) - rust-lang#136354 (Update docs for impl keyword) - rust-lang#136786 (Remove the deduplicate_blocks pass) - rust-lang#136833 (compiler: die immediately instead of handling unknown target codegen) - rust-lang#136847 (Simplify intra-crate qualifiers.) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#135285 (it-self → itself, build-system → build system, type-alias → type alias) - rust-lang#135677 (Small `rustc_resolve` cleanups) - rust-lang#136239 (show supported register classes in error message) - rust-lang#136246 (include note on variance and example) - rust-lang#136354 (Update docs for impl keyword) - rust-lang#136786 (Remove the deduplicate_blocks pass) - rust-lang#136833 (compiler: die immediately instead of handling unknown target codegen) - rust-lang#136847 (Simplify intra-crate qualifiers.) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#136354 - hkBst:patch-34, r=ibraheemdev Update docs for impl keyword This started as a fix for rust-lang#79878, but also introduces some structure (headings), and elaborates a tiny bit on impl Trait syntax.
This started as a fix for #79878, but also introduces some structure (headings), and elaborates a tiny bit on impl Trait syntax.