Update expect messages in tcp.rs doc examples to follow the style guide - #160538
Update expect messages in tcp.rs doc examples to follow the style guide#160538CacinieP wants to merge 1 commit into
Conversation
|
Thanks for the pull request, and welcome! The Rust Project is excited to review your changes, and you should hear from @jhpratt (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
Reword the `.expect(...)` messages in the TcpStream/TcpListener doc examples in library/std/src/net/tcp.rs to follow the 'expect as precondition' style from the std library guidance (describe why the operation is expected to succeed, rather than restating the failure). Examples: "set_nodelay call failed" -> "set_nodelay should succeed" "could not set TTL" -> "set_ttl should succeed" "Cannot set non-blocking" -> "set_nonblocking should succeed" Doc-only change, no behavior change.
7eded66 to
b568775
Compare
|
Done — removed the issue references from the commit message. They now only appear in the PR description. |
|
In the future, note that the project's LLM policy has been formally accepted. Outputs from LLMs must not be made public (such as in PR descriptions and comments here) except in very narrow situations. With that said, it's silly to close a trivial PR like this for that reason. @bors r+ rollup |
…tyle, r=jhpratt Update expect messages in tcp.rs doc examples to follow the style guide Related issue: rust-lang#159751 Rewords the `.expect(...)` messages in the `TcpStream`/`TcpListener` doc examples in `library/std/src/net/tcp.rs` to follow the "expect as precondition" style guide introduced in rust-lang#96033. Examples of the change: - `"set_nodelay call failed"` → `"set_nodelay should succeed"` - `"could not set TTL"` → `"set_ttl should succeed"` - `"Cannot set non-blocking"` → `"set_nonblocking should succeed"` 19 doc-example messages updated, all in doc comments (`///`). Doc-only change, no behavior change.
…tyle, r=jhpratt Update expect messages in tcp.rs doc examples to follow the style guide Related issue: rust-lang#159751 Rewords the `.expect(...)` messages in the `TcpStream`/`TcpListener` doc examples in `library/std/src/net/tcp.rs` to follow the "expect as precondition" style guide introduced in rust-lang#96033. Examples of the change: - `"set_nodelay call failed"` → `"set_nodelay should succeed"` - `"could not set TTL"` → `"set_ttl should succeed"` - `"Cannot set non-blocking"` → `"set_nonblocking should succeed"` 19 doc-example messages updated, all in doc comments (`///`). Doc-only change, no behavior change.
…uwer Rollup of 22 pull requests Successful merges: - #158147 (std: fix stack buffer overflow in Windows junction_point) - #159784 (Hint that memchr returns an in-bounds index) - #160130 (Select cache values to verify by key fingerprint, not value fingerprint) - #160343 (Rename `OutlivesPredicate` to `OutlivesClause`) - #160360 (Remove rustc_middle dependency on rustc_hir_pretty) - #160387 (rustc_codegen_ssa: Correctly apply the static `--jobs-backend` limit to backend parallelism) - #160422 (move mir-opt miri tests to CI logic) - #160444 (Avoid resolving path keywords outside `TypeNS`) - #160510 (Resolver: (un)tracked borrows for `CmRefCell` made safe my unsafe speculative flag) - #155424 ([blocked] Link to proposed LLM policy in CONTRIBUTING and pull request template) - #158726 (std: move futex implementations into sys::sync::futex) - #159225 (Split IncrCompSession out of Session) - #159820 (Make the `rustc_unsafe_specialization_marker` attribute actually `unsafe`) - #160198 (Rework `smallest_range_containing` to handle duplicates) - #160362 (Split `SpannedTypeVisitor` into its own crate, `rustc_ty_walk`) - #160390 (autodiff: Handle slice-tailed DSTs in type trees) - #160420 (Suggest `cast_signed()` for overflowing signed integer literals) - #160520 (Add some tests for specialization) - #160522 (fix(bootstrap): Normalize the names of proc macro dependency crates) - #160531 (docs: fix typo in AllowExprMetavar comment) - #160538 (Update expect messages in tcp.rs doc examples to follow the style guide) - #160548 (bootstrap: Register `coverage-map` and `coverage-run` aliases via a separate step)
…tyle, r=jhpratt Update expect messages in tcp.rs doc examples to follow the style guide Related issue: rust-lang#159751 Rewords the `.expect(...)` messages in the `TcpStream`/`TcpListener` doc examples in `library/std/src/net/tcp.rs` to follow the "expect as precondition" style guide introduced in rust-lang#96033. Examples of the change: - `"set_nodelay call failed"` → `"set_nodelay should succeed"` - `"could not set TTL"` → `"set_ttl should succeed"` - `"Cannot set non-blocking"` → `"set_nonblocking should succeed"` 19 doc-example messages updated, all in doc comments (`///`). Doc-only change, no behavior change.
…uwer Rollup of 25 pull requests Successful merges: - #154585 (treat no_mangle_generic_items as hard error instead of lint warning) - #158147 (std: fix stack buffer overflow in Windows junction_point) - #160130 (Select cache values to verify by key fingerprint, not value fingerprint) - #160343 (Rename `OutlivesPredicate` to `OutlivesClause`) - #160360 (Remove rustc_middle dependency on rustc_hir_pretty) - #160387 (rustc_codegen_ssa: Correctly apply the static `--jobs-backend` limit to backend parallelism) - #160422 (move mir-opt miri tests to CI logic) - #160444 (Avoid resolving path keywords outside `TypeNS`) - #160510 (Resolver: (un)tracked borrows for `CmRefCell` made safe my unsafe speculative flag) - #155424 ([blocked] Link to proposed LLM policy in CONTRIBUTING and pull request template) - #158726 (std: move futex implementations into sys::sync::futex) - #158762 (Emit thumb code on VEX V5) - #159225 (Split IncrCompSession out of Session) - #159820 (Make the `rustc_unsafe_specialization_marker` attribute actually `unsafe`) - #160198 (Rework `smallest_range_containing` to handle duplicates) - #160362 (Split `SpannedTypeVisitor` into its own crate, `rustc_ty_walk`) - #160390 (autodiff: Handle slice-tailed DSTs in type trees) - #160420 (Suggest `cast_signed()` for overflowing signed integer literals) - #160516 (Add regression test for HRTB projection in closure) - #160520 (Add some tests for specialization) - #160522 (fix(bootstrap): Normalize the names of proc macro dependency crates) - #160523 (Add regression test for opaque type) - #160531 (docs: fix typo in AllowExprMetavar comment) - #160538 (Update expect messages in tcp.rs doc examples to follow the style guide) - #160548 (bootstrap: Register `coverage-map` and `coverage-run` aliases via a separate step)
…tyle, r=jhpratt Update expect messages in tcp.rs doc examples to follow the style guide Related issue: rust-lang#159751 Rewords the `.expect(...)` messages in the `TcpStream`/`TcpListener` doc examples in `library/std/src/net/tcp.rs` to follow the "expect as precondition" style guide introduced in rust-lang#96033. Examples of the change: - `"set_nodelay call failed"` → `"set_nodelay should succeed"` - `"could not set TTL"` → `"set_ttl should succeed"` - `"Cannot set non-blocking"` → `"set_nonblocking should succeed"` 19 doc-example messages updated, all in doc comments (`///`). Doc-only change, no behavior change.
…uwer Rollup of 25 pull requests Successful merges: - #158147 (std: fix stack buffer overflow in Windows junction_point) - #160130 (Select cache values to verify by key fingerprint, not value fingerprint) - #160343 (Rename `OutlivesPredicate` to `OutlivesClause`) - #160360 (Remove rustc_middle dependency on rustc_hir_pretty) - #160387 (rustc_codegen_ssa: Correctly apply the static `--jobs-backend` limit to backend parallelism) - #160422 (move mir-opt miri tests to CI logic) - #160444 (Avoid resolving path keywords outside `TypeNS`) - #160510 (Resolver: (un)tracked borrows for `CmRefCell` made safe by unsafe speculative flag) - #155424 ([blocked] Link to proposed LLM policy in CONTRIBUTING and pull request template) - #158726 (std: move futex implementations into sys::sync::futex) - #158762 (Emit thumb code on VEX V5) - #159225 (Split IncrCompSession out of Session) - #159820 (Make the `rustc_unsafe_specialization_marker` attribute actually `unsafe`) - #160198 (Rework `smallest_range_containing` to handle duplicates) - #160362 (Split `SpannedTypeVisitor` into its own crate, `rustc_ty_walk`) - #160390 (autodiff: Handle slice-tailed DSTs in type trees) - #160420 (Suggest `cast_signed()` for overflowing signed integer literals) - #160501 (Add bootstrap CLI snapshot test for testing miri) - #160516 (Add regression test for HRTB projection in closure) - #160520 (Add some tests for specialization) - #160522 (fix(bootstrap): Normalize the names of proc macro dependency crates) - #160523 (Add regression test for opaque type) - #160531 (docs: fix typo in AllowExprMetavar comment) - #160538 (Update expect messages in tcp.rs doc examples to follow the style guide) - #160548 (bootstrap: Register `coverage-map` and `coverage-run` aliases via a separate step)
Related issue: #159751
Rewords the
.expect(...)messages in theTcpStream/TcpListenerdoc examples inlibrary/std/src/net/tcp.rsto follow the "expect as precondition" style guide introduced in #96033.Examples of the change:
"set_nodelay call failed"→"set_nodelay should succeed""could not set TTL"→"set_ttl should succeed""Cannot set non-blocking"→"set_nonblocking should succeed"19 doc-example messages updated, all in doc comments (
///). Doc-only change, no behavior change.