Skip to content

Add read_buf equivalents for positioned reads - #140459

Merged
bors merged 1 commit into
rust-lang:masterfrom
niklasf:feature/read-buf-at
Sep 4, 2025
Merged

Add read_buf equivalents for positioned reads#140459
bors merged 1 commit into
rust-lang:masterfrom
niklasf:feature/read-buf-at

Conversation

@niklasf

@niklasfniklasf commented Apr 29, 2025

Copy link
Copy Markdown
Contributor

Adds the following items under the read_buf (#78485)read_buf_at (#140771) feature:

  • std::os::unix::fs::FileExt::read_buf_at
  • std::os::unix::fs::FileExt::read_buf_exact_at
  • std::os::windows::fs::FileExt::seek_read_buf

try-job: x86_64-msvc*
try-job: test-various*
try-job: dist-various*

@rustbot

Copy link
Copy Markdown
Collaborator

r? @tgross35

rustbot has assigned @tgross35.
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

@rustbotrustbot added O-unix Operating system: Unix-like O-windows Operating system: Windows 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 Apr 29, 2025
@rust-log-analyzer

This comment has been minimized.

@niklasfniklasf closed this Apr 29, 2025
@niklasf
niklasfforce-pushed the feature/read-buf-at branch from 74e016c to 2ccb45fCompareApril 29, 2025 14:07
@niklasfniklasf reopened this Apr 29, 2025
@tgross35

Copy link
Copy Markdown
Member

Have these changes been discussed with libs-api at all? Usually changes to unstable API need to be proposed at https://github.com/rust-lang/libs-team/ with the ACP issue template.

This needs some tests as well.

@tgross35

Copy link
Copy Markdown
Member

For the above,
@rustbot author

@rustbotrustbot 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 May 1, 2025
@rustbot

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@niklasfniklasf mentioned this pull request May 7, 2025
4 tasks
@Kivooeo

Copy link
Copy Markdown
Member

For consistency and clarity, could we include safety comments on each unsafe block? Even brief notes are helpful to understand the assumptions being made

@niklasf
niklasfforce-pushed the feature/read-buf-at branch from 2ccb45f to 09ac65aCompareMay 12, 2025 21:45
@rust-log-analyzer

This comment has been minimized.

@niklasf
niklasfforce-pushed the feature/read-buf-at branch from 09ac65a to a22d2b4CompareMay 12, 2025 22:06
@rust-log-analyzer

This comment has been minimized.

@niklasf
niklasfforce-pushed the feature/read-buf-at branch from a22d2b4 to 59cb58eCompareMay 12, 2025 22:30
@rust-log-analyzer

This comment has been minimized.

@niklasf
niklasfforce-pushed the feature/read-buf-at branch from 59cb58e to 85e1da1CompareMay 12, 2025 22:41
@niklasf

niklasf commented May 12, 2025

Copy link
Copy Markdown
ContributorAuthor

Thank you both.

@rustbot ready

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 12, 2025
Comment threadlibrary/std/src/sys/fd/unix.rs Outdated
Comment threadlibrary/std/src/os/unix/fs.rs
Comment threadlibrary/std/src/sys/fd/unix.rs Outdated
@tgross35

Copy link
Copy Markdown
Member

@bors try

bors added a commit that referenced this pull request May 28, 2025
Add `read_buf` equivalents for positioned reads
Adds the following items under the ~~`read_buf` (#78485)~~ `read_buf_at` (#140771) feature:
- `std::os::unix::fs::FileExt::read_buf_at`
- `std::os::unix::fs::FileExt::read_buf_exact_at`
- `std::os::windows::fs::FileExt::seek_read_buf`
try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
@rustbotrustbot 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 Sep 3, 2025
Adds the following items under the `read_buf_at` feature:
- `std::os::unix::fs::FileExt::read_buf_at`
- `std::os::unix::fs::FileExt::read_buf_exact_at`
- `std::os::windows::fs::FileExt::seek_read_buf`
@niklasf

Copy link
Copy Markdown
ContributorAuthor

@rustbot ready

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 3, 2025
@tgross35

Copy link
Copy Markdown
Member

Going to rerun the try job just in case, but LGTM. Thanks for the updates

@bors2 try

rust-borsBot added a commit that referenced this pull request Sep 3, 2025
Add `read_buf` equivalents for positioned reads
try-job: `x86_64-msvc*`
try-job: `test-various*`
try-job: `dist-various*`
@rust-bors

This comment has been minimized.

@rust-bors

rust-borsBot commented Sep 3, 2025

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: f0baf1c (f0baf1cd9fa552c3e2ab50b1610b11ce86350ef2, parent: fd75a9c32d643f39c8c61df770d2cff60b3fefd5)

@tgross35

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Sep 3, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit c914c47 has been approved by tgross35

It is now in the queue for this repository.

@borsbors 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 Sep 3, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Sep 4, 2025
…oss35
Add `read_buf` equivalents for positioned reads
Adds the following items under the ~~`read_buf` (rust-lang#78485)~~ `read_buf_at` (rust-lang#140771) feature:
- `std::os::unix::fs::FileExt::read_buf_at`
- `std::os::unix::fs::FileExt::read_buf_exact_at`
- `std::os::windows::fs::FileExt::seek_read_buf`
try-job: `x86_64-msvc*`
try-job: `test-various*`
try-job: `dist-various*`
@ZalatharZalathar mentioned this pull request Sep 4, 2025
bors added a commit that referenced this pull request Sep 4, 2025
Rollup of 24 pull requests
Successful merges:
- #140459 (Add `read_buf` equivalents for positioned reads)
- #143725 (core: add Peekable::next_if_map)
- #145209 (Stabilize `path_add_extension`)
- #145342 (fix drop scope for `super let` bindings within `if let`)
- #145750 (raw_vec.rs: Remove superfluous fn alloc_guard)
- #145827 (On unused binding or binding not present in all patterns, suggest potential typo of unit struct/variant or const)
- #145932 (Allow `inline(always)` with a target feature behind a unstable feature `target_feature_inline_always`.)
- #145962 (Ensure we emit an allocator shim when only some crate types need one)
- #145963 (Add LSX accelerated implementation for source file analysis)
- #146054 (add `#[must_use]` to `array::repeat`)
- #146090 (Derive `PartialEq` for `InvisibleOrigin`)
- #146112 (don't uppercase error messages)
- #146120 (Correct typo in `rustc_errors` comment)
- #146124 (Test `rustc-dev` in `distcheck`)
- #146127 (Rename `ToolRustc` to `ToolRustcPrivate`)
- #146131 (rustdoc-search: add test case for indexing every item type)
- #146134 (llvm: nvptx: Layout update to match LLVM)
- #146136 (docs(std): add missing closing code block fences in doc comments)
- #146137 (Disallow frontmatter in `--cfg` and `--check-cfg` arguments)
- #146140 (compiletest: cygwin follows windows in using PATH for dynamic libraries)
- #146150 (fix(rustdoc): match rustc `--emit` precedence )
- #146155 (Make bootstrap self test parallel)
- #146161 ([rustdoc] Uncomment code to add scraped rustdoc examples in loaded paths)
- #146172 (triagebot: configure some pings when certain attributes are used)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit f073f64 into rust-lang:masterSep 4, 2025
11 checks passed
@rustbotrustbot added this to the 1.91.0 milestone Sep 4, 2025
rust-timer added a commit that referenced this pull request Sep 4, 2025
Rollup merge of #140459 - niklasf:feature/read-buf-at, r=tgross35
Add `read_buf` equivalents for positioned reads
Adds the following items under the ~~`read_buf` (#78485)~~ `read_buf_at` (#140771) feature:
- `std::os::unix::fs::FileExt::read_buf_at`
- `std::os::unix::fs::FileExt::read_buf_exact_at`
- `std::os::windows::fs::FileExt::seek_read_buf`
try-job: `x86_64-msvc*`
try-job: `test-various*`
try-job: `dist-various*`
github-actionsBot pushed a commit to rust-lang/miri that referenced this pull request Sep 5, 2025
Rollup of 24 pull requests
Successful merges:
- rust-lang/rust#140459 (Add `read_buf` equivalents for positioned reads)
- rust-lang/rust#143725 (core: add Peekable::next_if_map)
- rust-lang/rust#145209 (Stabilize `path_add_extension`)
- rust-lang/rust#145342 (fix drop scope for `super let` bindings within `if let`)
- rust-lang/rust#145750 (raw_vec.rs: Remove superfluous fn alloc_guard)
- rust-lang/rust#145827 (On unused binding or binding not present in all patterns, suggest potential typo of unit struct/variant or const)
- rust-lang/rust#145932 (Allow `inline(always)` with a target feature behind a unstable feature `target_feature_inline_always`.)
- rust-lang/rust#145962 (Ensure we emit an allocator shim when only some crate types need one)
- rust-lang/rust#145963 (Add LSX accelerated implementation for source file analysis)
- rust-lang/rust#146054 (add `#[must_use]` to `array::repeat`)
- rust-lang/rust#146090 (Derive `PartialEq` for `InvisibleOrigin`)
- rust-lang/rust#146112 (don't uppercase error messages)
- rust-lang/rust#146120 (Correct typo in `rustc_errors` comment)
- rust-lang/rust#146124 (Test `rustc-dev` in `distcheck`)
- rust-lang/rust#146127 (Rename `ToolRustc` to `ToolRustcPrivate`)
- rust-lang/rust#146131 (rustdoc-search: add test case for indexing every item type)
- rust-lang/rust#146134 (llvm: nvptx: Layout update to match LLVM)
- rust-lang/rust#146136 (docs(std): add missing closing code block fences in doc comments)
- rust-lang/rust#146137 (Disallow frontmatter in `--cfg` and `--check-cfg` arguments)
- rust-lang/rust#146140 (compiletest: cygwin follows windows in using PATH for dynamic libraries)
- rust-lang/rust#146150 (fix(rustdoc): match rustc `--emit` precedence )
- rust-lang/rust#146155 (Make bootstrap self test parallel)
- rust-lang/rust#146161 ([rustdoc] Uncomment code to add scraped rustdoc examples in loaded paths)
- rust-lang/rust#146172 (triagebot: configure some pings when certain attributes are used)
r? `@ghost`
`@rustbot` modify labels: rollup
github-actionsBot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Sep 8, 2025
Rollup of 24 pull requests
Successful merges:
- rust-lang/rust#140459 (Add `read_buf` equivalents for positioned reads)
- rust-lang/rust#143725 (core: add Peekable::next_if_map)
- rust-lang/rust#145209 (Stabilize `path_add_extension`)
- rust-lang/rust#145342 (fix drop scope for `super let` bindings within `if let`)
- rust-lang/rust#145750 (raw_vec.rs: Remove superfluous fn alloc_guard)
- rust-lang/rust#145827 (On unused binding or binding not present in all patterns, suggest potential typo of unit struct/variant or const)
- rust-lang/rust#145932 (Allow `inline(always)` with a target feature behind a unstable feature `target_feature_inline_always`.)
- rust-lang/rust#145962 (Ensure we emit an allocator shim when only some crate types need one)
- rust-lang/rust#145963 (Add LSX accelerated implementation for source file analysis)
- rust-lang/rust#146054 (add `#[must_use]` to `array::repeat`)
- rust-lang/rust#146090 (Derive `PartialEq` for `InvisibleOrigin`)
- rust-lang/rust#146112 (don't uppercase error messages)
- rust-lang/rust#146120 (Correct typo in `rustc_errors` comment)
- rust-lang/rust#146124 (Test `rustc-dev` in `distcheck`)
- rust-lang/rust#146127 (Rename `ToolRustc` to `ToolRustcPrivate`)
- rust-lang/rust#146131 (rustdoc-search: add test case for indexing every item type)
- rust-lang/rust#146134 (llvm: nvptx: Layout update to match LLVM)
- rust-lang/rust#146136 (docs(std): add missing closing code block fences in doc comments)
- rust-lang/rust#146137 (Disallow frontmatter in `--cfg` and `--check-cfg` arguments)
- rust-lang/rust#146140 (compiletest: cygwin follows windows in using PATH for dynamic libraries)
- rust-lang/rust#146150 (fix(rustdoc): match rustc `--emit` precedence )
- rust-lang/rust#146155 (Make bootstrap self test parallel)
- rust-lang/rust#146161 ([rustdoc] Uncomment code to add scraped rustdoc examples in loaded paths)
- rust-lang/rust#146172 (triagebot: configure some pings when certain attributes are used)
r? `@ghost`
`@rustbot` modify labels: rollup
github-actionsBot pushed a commit to model-checking/verify-rust-std that referenced this pull request Sep 9, 2025
…oss35
Add `read_buf` equivalents for positioned reads
Adds the following items under the ~~`read_buf` (rust-lang#78485)~~ `read_buf_at` (rust-lang#140771) feature:
- `std::os::unix::fs::FileExt::read_buf_at`
- `std::os::unix::fs::FileExt::read_buf_exact_at`
- `std::os::windows::fs::FileExt::seek_read_buf`
try-job: `x86_64-msvc*`
try-job: `test-various*`
try-job: `dist-various*`
github-actionsBot pushed a commit to model-checking/verify-rust-std that referenced this pull request Sep 9, 2025
Rollup of 24 pull requests
Successful merges:
- rust-lang#140459 (Add `read_buf` equivalents for positioned reads)
- rust-lang#143725 (core: add Peekable::next_if_map)
- rust-lang#145209 (Stabilize `path_add_extension`)
- rust-lang#145342 (fix drop scope for `super let` bindings within `if let`)
- rust-lang#145750 (raw_vec.rs: Remove superfluous fn alloc_guard)
- rust-lang#145827 (On unused binding or binding not present in all patterns, suggest potential typo of unit struct/variant or const)
- rust-lang#145932 (Allow `inline(always)` with a target feature behind a unstable feature `target_feature_inline_always`.)
- rust-lang#145962 (Ensure we emit an allocator shim when only some crate types need one)
- rust-lang#145963 (Add LSX accelerated implementation for source file analysis)
- rust-lang#146054 (add `#[must_use]` to `array::repeat`)
- rust-lang#146090 (Derive `PartialEq` for `InvisibleOrigin`)
- rust-lang#146112 (don't uppercase error messages)
- rust-lang#146120 (Correct typo in `rustc_errors` comment)
- rust-lang#146124 (Test `rustc-dev` in `distcheck`)
- rust-lang#146127 (Rename `ToolRustc` to `ToolRustcPrivate`)
- rust-lang#146131 (rustdoc-search: add test case for indexing every item type)
- rust-lang#146134 (llvm: nvptx: Layout update to match LLVM)
- rust-lang#146136 (docs(std): add missing closing code block fences in doc comments)
- rust-lang#146137 (Disallow frontmatter in `--cfg` and `--check-cfg` arguments)
- rust-lang#146140 (compiletest: cygwin follows windows in using PATH for dynamic libraries)
- rust-lang#146150 (fix(rustdoc): match rustc `--emit` precedence )
- rust-lang#146155 (Make bootstrap self test parallel)
- rust-lang#146161 ([rustdoc] Uncomment code to add scraped rustdoc examples in loaded paths)
- rust-lang#146172 (triagebot: configure some pings when certain attributes are used)
r? `@ghost`
`@rustbot` modify labels: rollup
Kobzol pushed a commit to Kobzol/portable-simd that referenced this pull request Feb 3, 2026
Rollup of 24 pull requests
Successful merges:
- rust-lang/rust#140459 (Add `read_buf` equivalents for positioned reads)
- rust-lang/rust#143725 (core: add Peekable::next_if_map)
- rust-lang/rust#145209 (Stabilize `path_add_extension`)
- rust-lang/rust#145342 (fix drop scope for `super let` bindings within `if let`)
- rust-lang/rust#145750 (raw_vec.rs: Remove superfluous fn alloc_guard)
- rust-lang/rust#145827 (On unused binding or binding not present in all patterns, suggest potential typo of unit struct/variant or const)
- rust-lang/rust#145932 (Allow `inline(always)` with a target feature behind a unstable feature `target_feature_inline_always`.)
- rust-lang/rust#145962 (Ensure we emit an allocator shim when only some crate types need one)
- rust-lang/rust#145963 (Add LSX accelerated implementation for source file analysis)
- rust-lang/rust#146054 (add `#[must_use]` to `array::repeat`)
- rust-lang/rust#146090 (Derive `PartialEq` for `InvisibleOrigin`)
- rust-lang/rust#146112 (don't uppercase error messages)
- rust-lang/rust#146120 (Correct typo in `rustc_errors` comment)
- rust-lang/rust#146124 (Test `rustc-dev` in `distcheck`)
- rust-lang/rust#146127 (Rename `ToolRustc` to `ToolRustcPrivate`)
- rust-lang/rust#146131 (rustdoc-search: add test case for indexing every item type)
- rust-lang/rust#146134 (llvm: nvptx: Layout update to match LLVM)
- rust-lang/rust#146136 (docs(std): add missing closing code block fences in doc comments)
- rust-lang/rust#146137 (Disallow frontmatter in `--cfg` and `--check-cfg` arguments)
- rust-lang/rust#146140 (compiletest: cygwin follows windows in using PATH for dynamic libraries)
- rust-lang/rust#146150 (fix(rustdoc): match rustc `--emit` precedence )
- rust-lang/rust#146155 (Make bootstrap self test parallel)
- rust-lang/rust#146161 ([rustdoc] Uncomment code to add scraped rustdoc examples in loaded paths)
- rust-lang/rust#146172 (triagebot: configure some pings when certain attributes are used)
r? `@ghost`
`@rustbot` modify labels: rollup
Kobzol pushed a commit to Kobzol/portable-simd that referenced this pull request Feb 3, 2026
Rollup of 24 pull requests
Successful merges:
- rust-lang/rust#140459 (Add `read_buf` equivalents for positioned reads)
- rust-lang/rust#143725 (core: add Peekable::next_if_map)
- rust-lang/rust#145209 (Stabilize `path_add_extension`)
- rust-lang/rust#145342 (fix drop scope for `super let` bindings within `if let`)
- rust-lang/rust#145750 (raw_vec.rs: Remove superfluous fn alloc_guard)
- rust-lang/rust#145827 (On unused binding or binding not present in all patterns, suggest potential typo of unit struct/variant or const)
- rust-lang/rust#145932 (Allow `inline(always)` with a target feature behind a unstable feature `target_feature_inline_always`.)
- rust-lang/rust#145962 (Ensure we emit an allocator shim when only some crate types need one)
- rust-lang/rust#145963 (Add LSX accelerated implementation for source file analysis)
- rust-lang/rust#146054 (add `#[must_use]` to `array::repeat`)
- rust-lang/rust#146090 (Derive `PartialEq` for `InvisibleOrigin`)
- rust-lang/rust#146112 (don't uppercase error messages)
- rust-lang/rust#146120 (Correct typo in `rustc_errors` comment)
- rust-lang/rust#146124 (Test `rustc-dev` in `distcheck`)
- rust-lang/rust#146127 (Rename `ToolRustc` to `ToolRustcPrivate`)
- rust-lang/rust#146131 (rustdoc-search: add test case for indexing every item type)
- rust-lang/rust#146134 (llvm: nvptx: Layout update to match LLVM)
- rust-lang/rust#146136 (docs(std): add missing closing code block fences in doc comments)
- rust-lang/rust#146137 (Disallow frontmatter in `--cfg` and `--check-cfg` arguments)
- rust-lang/rust#146140 (compiletest: cygwin follows windows in using PATH for dynamic libraries)
- rust-lang/rust#146150 (fix(rustdoc): match rustc `--emit` precedence )
- rust-lang/rust#146155 (Make bootstrap self test parallel)
- rust-lang/rust#146161 ([rustdoc] Uncomment code to add scraped rustdoc examples in loaded paths)
- rust-lang/rust#146172 (triagebot: configure some pings when certain attributes are used)
r? `@ghost`
`@rustbot` modify labels: rollup
@niklasf
niklasf deleted the feature/read-buf-at branch June 21, 2026 20:55
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-unixOperating system: Unix-likeO-windowsOperating system: WindowsS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-libsRelevant 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.

7 participants

@niklasf@rustbot@rust-log-analyzer@tgross35@Kivooeo@bors@ChrisDenton