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

Describe and use CStr literals in CStr and CString docs #124593

Merged
merged 2 commits into from
May 3, 2024

Conversation

GKFX
Copy link
Contributor

@GKFX GKFX commented May 1, 2024

Mention CStr literals in the description of both types, and use them in some of the code samples for CStr. This is intended to make C string literals more discoverable.

Additionally, I don't think the orange "This example is not tested" warnings are very encouraging, so I have made the examples on CStr build.

@GKFX GKFX force-pushed the cstr-literals-in-api-docs branch from 5f38ed4 to e610a52 Compare May 1, 2024 18:59
@rustbot rustbot added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label May 1, 2024
@rustbot
Copy link
Collaborator

rustbot commented May 1, 2024

r? @workingjubilee

rustbot has assigned @workingjubilee.
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 the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 1, 2024
@workingjubilee
Copy link
Member

Additionally, I don't think the orange "This example is not tested" warnings are very encouraging, so I have made the examples on CStr build.

Ooh, thank you!

library/core/src/ffi/c_str.rs Outdated Show resolved Hide resolved
library/core/src/ffi/c_str.rs Show resolved Hide resolved
library/core/src/ffi/c_str.rs Outdated Show resolved Hide resolved
@workingjubilee
Copy link
Member

Wow, the comment hack even renders exactly like expected! No bugs from rustdoc! Thank you!

@workingjubilee
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented May 2, 2024

📌 Commit e610a52 has been approved by workingjubilee

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-review Status: Awaiting review from the assignee but also interested parties. labels May 2, 2024
fmease added a commit to fmease/rust that referenced this pull request May 3, 2024
…workingjubilee

Describe and use CStr literals in CStr and CString docs

Mention CStr literals in the description of both types, and use them in some of the code samples for CStr. This is intended to make C string literals more discoverable.

Additionally, I don't think the orange "This example is not tested" warnings are very encouraging, so I have made the examples on `CStr` build.
@GKFX
Copy link
Contributor Author

GKFX commented May 3, 2024

@workingjubilee This seems to no longer be on the bors queue, could you reapprove?

@workingjubilee
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented May 3, 2024

📌 Commit 0e0042f has been approved by workingjubilee

It is now in the queue for this repository.

workingjubilee added a commit to workingjubilee/rustc that referenced this pull request May 3, 2024
…workingjubilee

Describe and use CStr literals in CStr and CString docs

Mention CStr literals in the description of both types, and use them in some of the code samples for CStr. This is intended to make C string literals more discoverable.

Additionally, I don't think the orange "This example is not tested" warnings are very encouraging, so I have made the examples on `CStr` build.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 3, 2024
…workingjubilee

Describe and use CStr literals in CStr and CString docs

Mention CStr literals in the description of both types, and use them in some of the code samples for CStr. This is intended to make C string literals more discoverable.

Additionally, I don't think the orange "This example is not tested" warnings are very encouraging, so I have made the examples on `CStr` build.
bors added a commit to rust-lang-ci/rust that referenced this pull request May 3, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#122492 (Implement ptr_as_ref_unchecked)
 - rust-lang#123815 (Fix cannot usage in time.rs)
 - rust-lang#124059 (default_alloc_error_hook: explain difference to default __rdl_oom in alloc)
 - rust-lang#124510 (Add raw identifier in a typo suggestion)
 - rust-lang#124555 (coverage: Clean up creation of MC/DC condition bitmaps)
 - rust-lang#124593 (Describe and use CStr literals in CStr and CString docs)
 - rust-lang#124630 (CI: remove `env-x86_64-apple-tests` YAML anchor)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 1ff247c into rust-lang:master May 3, 2024
6 checks passed
@rustbot rustbot added this to the 1.80.0 milestone May 3, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 3, 2024
Rollup merge of rust-lang#124593 - GKFX:cstr-literals-in-api-docs, r=workingjubilee

Describe and use CStr literals in CStr and CString docs

Mention CStr literals in the description of both types, and use them in some of the code samples for CStr. This is intended to make C string literals more discoverable.

Additionally, I don't think the orange "This example is not tested" warnings are very encouraging, so I have made the examples on `CStr` build.
@GKFX GKFX deleted the cstr-literals-in-api-docs branch May 3, 2024 21:50
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.

4 participants