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

More clear documentation for NonNull<T> #79841

Merged
merged 1 commit into from
Jan 24, 2021
Merged

Conversation

fintelia
Copy link
Contributor

@fintelia fintelia commented Dec 8, 2020

Rephrase and hopefully clarify the discussion of covariance in NonNull<T> documentation.

I'm very much not an expert so someone should definitely double check the correctness of what I'm saying. At the same time, the new language makes more sense to me, so hopefully it also is more logical to others whose knowledge of covariance basically begins and ends with the Rustonomicon chapter.

Related to #48929.

@rust-highfive
Copy link
Collaborator

r? @kennytm

(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 Dec 8, 2020
@camelid camelid added the A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools label Dec 9, 2020
@camelid
Copy link
Member

camelid commented Dec 9, 2020

@fintelia You left trailing whitespace in the file. Once you remove that, CI should pass!

tidy error: /checkout/library/core/src/ptr/non_null.rs:26: trailing whitespace
tidy error: /checkout/library/core/src/ptr/non_null.rs:29: trailing whitespace
some tidy checks failed

@camelid camelid added the A-raw-pointers Area: raw pointers, MaybeUninit, NonNull label Dec 10, 2020
@JohnTitor JohnTitor 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 Jan 7, 2021
@camelid
Copy link
Member

camelid commented Jan 22, 2021

Ping from triage: @fintelia could you address kennytm's comment? Thanks!

Rephrase and hopefully clarify the discussion of covariance in `NonNull<T>` documentation.
@fintelia
Copy link
Contributor Author

Thanks for the ping. I added back the paragraph as requested.

@kennytm
Copy link
Member

kennytm commented Jan 22, 2021

thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jan 22, 2021

📌 Commit 0392085 has been approved by kennytm

@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 Jan 22, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 23, 2021
…as-schievink

Rollup of 15 pull requests

Successful merges:

 - rust-lang#79841 (More clear documentation for NonNull<T>)
 - rust-lang#81072 (PlaceRef::ty: use method call syntax)
 - rust-lang#81130 (Edit rustc_middle::dep_graph module documentation)
 - rust-lang#81170 (Avoid hash_slice in VecDeque's Hash implementation)
 - rust-lang#81243 (mir: Improve size_of handling when arg is unsized)
 - rust-lang#81245 (Update cargo)
 - rust-lang#81249 (Lower closure prototype after its body.)
 - rust-lang#81252 (Add more self-profile info to rustc_resolve)
 - rust-lang#81275 (Fix <unknown> queries and add more timing info to render_html)
 - rust-lang#81281 (Inline methods of Path and OsString)
 - rust-lang#81283 (Note library tracking issue template in tracking issue template.)
 - rust-lang#81285 (Remove special casing of rustdoc in rustc_lint)
 - rust-lang#81288 (rustdoc: Fix visibility of trait and impl items)
 - rust-lang#81298 (replace RefCell with Cell in FnCtxt)
 - rust-lang#81301 (Fix small typo)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7635462 into rust-lang:master Jan 24, 2021
@rustbot rustbot added this to the 1.51.0 milestone Jan 24, 2021
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 A-raw-pointers Area: raw pointers, MaybeUninit, NonNull S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants