Skip to content

Conversation

@notriddle
Copy link
Contributor

On most From implementations, the docstring is attached to the function. This is also how people have been recommended to do it.

Screenshots:

@rust-highfive
Copy link
Contributor

r? @yaahc

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 22, 2021
@notriddle notriddle force-pushed the num-docs-from-undocumented-items-toggle branch from 8473bb8 to 9b23025 Compare April 22, 2021 18:32
@notriddle notriddle changed the title Get rid of "[+] show undocumented items" toggle on numeric From impls rustdoc: Get rid of "[+] show undocumented items" toggle on numeric From impls Apr 22, 2021
@yaahc
Copy link
Member

yaahc commented Apr 22, 2021

Can you add screenshots that expand [+] to verify that the output looks the same otherwise, for both From and TryFrom.

@notriddle
Copy link
Contributor Author

Here's what it looks like with an item open:

image

@rust-log-analyzer

This comment has been minimized.

@notriddle notriddle force-pushed the num-docs-from-undocumented-items-toggle branch from 9b23025 to c247055 Compare April 22, 2021 18:51
@yaahc
Copy link
Member

yaahc commented Apr 22, 2021

Here's what it looks like with an item open:

Looks good, and can you double check what TryFrom looks like?

@notriddle
Copy link
Contributor Author

notriddle commented Apr 22, 2021

They look fine, too.

image

image

@yaahc
Copy link
Member

yaahc commented Apr 22, 2021

Perfect, okay. This looks good to me. cc @rust-lang/docs

@GuillaumeGomez
Copy link
Member

Looks good to me as well, thanks!

@yaahc
Copy link
Member

yaahc commented Apr 22, 2021

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 22, 2021

📌 Commit c247055 has been approved by yaahc

@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-review Status: Awaiting review from the assignee but also interested parties. labels Apr 22, 2021
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Apr 23, 2021
…d-items-toggle, r=yaahc

rustdoc: Get rid of "[+] show undocumented items" toggle on numeric From impls

On most From implementations, the docstring is attached to the function. This is also how people have been [recommended] to do it.

Screenshots:

* [before](https://user-images.githubusercontent.com/1593513/115767662-323c5480-a35e-11eb-9918-98aba83e9183.png)
* [after](https://user-images.githubusercontent.com/1593513/115767675-35374500-a35e-11eb-964f-c28eeb6c807a.png)

[recommended]: rust-lang#51430 (comment)
@jyn514 jyn514 added A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Apr 23, 2021
@jyn514
Copy link
Member

jyn514 commented Apr 23, 2021

@notriddle just a small nit - do you mind not adding rustdoc: to the front since this only modifies the standard library? Originally I thought this was a general behavior change that never showed 'undocumented items' on trait impls.

@notriddle notriddle changed the title rustdoc: Get rid of "[+] show undocumented items" toggle on numeric From impls doc: Get rid of "[+] show undocumented items" toggle on numeric From impls Apr 23, 2021
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Apr 23, 2021
…d-items-toggle, r=yaahc

doc: Get rid of "[+] show undocumented items" toggle on numeric From impls

On most From implementations, the docstring is attached to the function. This is also how people have been [recommended] to do it.

Screenshots:

* [before](https://user-images.githubusercontent.com/1593513/115767662-323c5480-a35e-11eb-9918-98aba83e9183.png)
* [after](https://user-images.githubusercontent.com/1593513/115767675-35374500-a35e-11eb-964f-c28eeb6c807a.png)

[recommended]: rust-lang#51430 (comment)
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Apr 23, 2021
…d-items-toggle, r=yaahc

doc: Get rid of "[+] show undocumented items" toggle on numeric From impls

On most From implementations, the docstring is attached to the function. This is also how people have been [recommended] to do it.

Screenshots:

* [before](https://user-images.githubusercontent.com/1593513/115767662-323c5480-a35e-11eb-9918-98aba83e9183.png)
* [after](https://user-images.githubusercontent.com/1593513/115767675-35374500-a35e-11eb-964f-c28eeb6c807a.png)

[recommended]: rust-lang#51430 (comment)
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 23, 2021
Rollup of 11 pull requests

Successful merges:

 - rust-lang#80805 (Improve `Iterator::by_ref` example)
 - rust-lang#84248 (Remove duplicated fn(Box<[T]>) -> Vec<T>)
 - rust-lang#84321 (rustdoc: Convert sub-variant toggle to HTML)
 - rust-lang#84359 (:arrow_up: rust-analyzer)
 - rust-lang#84374 (Clean up .gitignore)
 - rust-lang#84387 (Move `sys_common::poison` to `sync::poison`)
 - rust-lang#84430 (doc/platform-support: clarify UEFI support)
 - rust-lang#84433 (Prevent control, shift and alt keys to make search input lose focus)
 - rust-lang#84444 (doc: Get rid of "[+] show undocumented items" toggle on numeric From impls)
 - rust-lang#84456 (Fix ICE if original_span(fn_sig) returns a span not in body sourcefile)
 - rust-lang#84469 (Update comment on `PrimTy::name_str`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9ada731 into rust-lang:master Apr 23, 2021
@rustbot rustbot added this to the 1.53.0 milestone Apr 23, 2021
@notriddle notriddle deleted the num-docs-from-undocumented-items-toggle branch April 24, 2021 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools 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.

8 participants