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

Update docs for impl keyword #136354

Merged
merged 1 commit into from
Feb 12, 2025
Merged

Update docs for impl keyword #136354

merged 1 commit into from
Feb 12, 2025

Conversation

hkBst
Copy link
Contributor

@hkBst hkBst commented Jan 31, 2025

This started as a fix for #79878, but also introduces some structure (headings), and elaborates a tiny bit on impl Trait syntax.

@rustbot
Copy link
Collaborator

rustbot commented Jan 31, 2025

r? @ibraheemdev

rustbot has assigned @ibraheemdev.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 31, 2025
@rust-log-analyzer

This comment has been minimized.

Comment on lines 654 to 655
/// * 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`.
Copy link
Member

@fmease fmease Jan 31, 2025

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.

Copy link
Contributor Author

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.

@ibraheemdev
Copy link
Member

r=me after the nit.

@ibraheemdev ibraheemdev 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 Feb 11, 2025
@ibraheemdev
Copy link
Member

Thanks. @bors r+

@bors
Copy link
Contributor

bors commented Feb 11, 2025

📌 Commit 166680c has been approved by ibraheemdev

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 11, 2025
@fmease
Copy link
Member

fmease commented Feb 11, 2025

@bors rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 11, 2025
…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
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 11, 2025
…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
@bors bors merged commit 45a0ec8 into rust-lang:master Feb 12, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Feb 12, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 12, 2025
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.
@hkBst hkBst deleted the patch-34 branch February 12, 2025 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants