Skip to content

Use C-string literals to reduce boilerplate #141498

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

Merged
merged 1 commit into from
May 25, 2025

Conversation

tamird
Copy link
Contributor

@tamird tamird commented May 24, 2025

Reduce boilerplate in doctests by replacing fallible function calls with
literals.

Reduce boilerplate in doctests by replacing fallible function calls with
literals.
@rustbot
Copy link
Collaborator

rustbot commented May 24, 2025

r? @jhpratt

rustbot has assigned @jhpratt.
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 May 24, 2025
Copy link
Member

@hkBst hkBst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jhpratt
Copy link
Member

jhpratt commented May 24, 2025

Given that the docs already has a callout of c"" syntax, it seems reasonable to use it in this context.

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented May 24, 2025

📌 Commit 7b5a079 has been approved by jhpratt

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 24, 2025
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request May 24, 2025
Use C-string literals to reduce boilerplate

Reduce boilerplate in doctests by replacing fallible function calls with
literals.
jhpratt added a commit to jhpratt/rust that referenced this pull request May 24, 2025
Use C-string literals to reduce boilerplate

Reduce boilerplate in doctests by replacing fallible function calls with
literals.
bors added a commit that referenced this pull request May 24, 2025
Rollup of 6 pull requests

Successful merges:

 - #140066 (Stabilize `<[T; N]>::as_mut_slice` as `const`)
 - #141105 (additional edge cases tests for `path.rs` 🧪 )
 - #141487 (Update askama to `0.14.0`)
 - #141498 (Use C-string literals to reduce boilerplate)
 - #141505 (rename internal panicking::try to catch_unwind)
 - #141511 (Cleanup CodegenFnAttrFlags)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c4a313a into rust-lang:master May 25, 2025
6 checks passed
@rustbot rustbot added this to the 1.89.0 milestone May 25, 2025
rust-timer added a commit that referenced this pull request May 25, 2025
Rollup merge of #141498 - tamird:cstr-example-noise, r=jhpratt

Use C-string literals to reduce boilerplate

Reduce boilerplate in doctests by replacing fallible function calls with
literals.
@tamird tamird deleted the cstr-example-noise branch May 25, 2025 01:15
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request May 25, 2025
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#140066 (Stabilize `<[T; N]>::as_mut_slice` as `const`)
 - rust-lang/rust#141105 (additional edge cases tests for `path.rs` 🧪 )
 - rust-lang/rust#141487 (Update askama to `0.14.0`)
 - rust-lang/rust#141498 (Use C-string literals to reduce boilerplate)
 - rust-lang/rust#141505 (rename internal panicking::try to catch_unwind)
 - rust-lang/rust#141511 (Cleanup CodegenFnAttrFlags)

r? `@ghost`
`@rustbot` modify labels: rollup
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request May 26, 2025
Use C-string literals to reduce boilerplate

Reduce boilerplate in doctests by replacing fallible function calls with
literals.
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.

5 participants