Skip to content

Add .seek_read_buf_exact() to std::os::windows::fs::FileExt - #163183

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
json420:seek_read_buf_exact
Sep 29, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
json420:seek_read_buf_exact

Conversation

@json420

@json420 json420 commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

View all comments

Tracking issue: #163183

This adds a seek_read_buf_exact() method to std::os::windows::fs::FileExt based on the read_buf_exact_at() method in std::os::unix::fs::FileExt.

And this adds a test for seek_read_buf_exact() based on the test for seek_read_buf().

This extends the work in #140771 which added seek_read_buf() and the work in #162868 which added seek_read_exact() and seek_write_all() methods to std::os::windows::fs::FileExt.

No LLMs were used in writing this PR.

@rustbot rustbot added 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 Sep 22, 2026
@rustbot

rustbot commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

r? @clarfonthey

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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 13 candidates
  • Random selection from 7 candidates

@clarfonthey

Copy link
Copy Markdown
Contributor

I would just combine the issues for all the seek_* methods since they seem like they'd be merged together. I think that BorrowedCursor will probably be stabilized first so that should be fine.

@rustbot

This comment has been minimized.

@json420

json420 commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

@clarfonthey - is that okay now? I switched to seek_read_exact_seek_write_all as the feature gate.

@json420
json420 force-pushed the seek_read_buf_exact branch 3 times, most recently from d077d8c to 2c29eb7 Compare September 23, 2026 01:56
@json420

json420 commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

@clarfonthey Ok, now I think it's ready now. Thanks!

Just to check, am I correct that all three features need to be enable for the doc example to work?

    /// #![feature(core_io_borrowed_buf)]
    /// #![feature(read_buf_at)]
    /// #![feature(seek_read_exact_seek_write_all)]

@clarfonthey

Copy link
Copy Markdown
Contributor

I think read_buf_at isn't necessary with the feature flag changed, but otherwise, yes, that's right.

@json420

json420 commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

The new .seek_read_buf_exact() method here calls .seek_read_buf(), which is an unstable feature gated by read_buf_at... so I think I do still need read_buf_at. Is that correct?

@clarfonthey

Copy link
Copy Markdown
Contributor

Ah, yeah, never mind then. If the tests don't pass without it, you need it.

Comment thread library/std/src/fs/tests.rs Outdated
@json420
json420 force-pushed the seek_read_buf_exact branch from 2c29eb7 to 6a6b9b4 Compare September 27, 2026 11:40
@clarfonthey

Copy link
Copy Markdown
Contributor

Looks good to me!

@bors r+ rollup

Thank you!

@rust-bors

rust-bors Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 6a6b9b4 has been approved by clarfonthey

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 28, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 28, 2026
…rfonthey

Add .seek_read_buf_exact() to std::os::windows::fs::FileExt

Tracking issue: rust-lang#163183

This adds a `seek_read_buf_exact()` method to `std::os::windows::fs::FileExt` based on the `read_buf_exact_at()` method in `std::os::unix::fs::FileExt`.

And this adds a test for `seek_read_buf_exact()` based on the test for `seek_read_buf()`.

This extends the work in rust-lang#140771 which added `seek_read_buf()` and the work in rust-lang#162868 which added `seek_read_exact()` and `seek_write_all()` methods to  `std::os::windows::fs::FileExt`.

No LLMs were used in writing this PR.
rust-bors Bot pushed a commit that referenced this pull request Sep 28, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #162915 (Fix maximum `send` length on non-{Mac, Windows} platforms)
 - #162373 (Move the foreign module #[link] ABI check to attribute parsing)
 - #162829 (regression test for inherent associated const ICE)
 - #163183 (Add .seek_read_buf_exact() to std::os::windows::fs::FileExt)
 - #163421 (triagebot: Subscribe me to changes in test-float-parse)
@JonathanBrouwer

Copy link
Copy Markdown
Member

💔 I suspect this PR failed tests as part of a rollup
@bors r-

After fixing the problem, consider running a try job for the failed job before re-approving.

Link to failure: #163430 (comment)

@rust-bors rust-bors Bot 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 28, 2026
@rust-bors

rust-bors Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved.

This PR was contained in a rollup (#163430), which was unapproved.

View changes since this unapproval

@json420

json420 commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Previous comment was wrong. I think it's fixed now.

Yeah, thing is... I don't have a local Windows machine to test with. Shhh.

@json420
json420 force-pushed the seek_read_buf_exact branch from 6a6b9b4 to e8434f7 Compare September 28, 2026 13:19
@clarfonthey

Copy link
Copy Markdown
Contributor

Oh, I had kind of assumed you were testing locally…

@bors try jobs=-msvc

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 28, 2026
Add .seek_read_buf_exact() to std::os::windows::fs::FileExt


try-job: *-msvc*
@rust-log-analyzer

This comment has been minimized.

@json420
json420 force-pushed the seek_read_buf_exact branch from e8434f7 to 67cb4ce Compare September 28, 2026 15:48
@json420

json420 commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

Oops, read_buf_at isn't actually needed. 3rd times definitely the charm.

  ---- library\std\src\os\windows\fs.rs - os::windows::fs::FileExt::seek_read_buf_exact (line 165) stdout ----
  error: feature `read_buf_at` is declared but not used
     --> library\std\src\os\windows\fs.rs:167:12
      |
  167 | #![feature(read_buf_at)]
      |            ^^^^^^^^^^^
      |
  note: the lint level is defined here
     --> library\std\src\os\windows\fs.rs:164:9
      |
  164 | #![deny(warnings)]
      |         ^^^^^^^^
      = note: `#[deny(unused_features)]` implied by `#[deny(warnings)]`
  
  error: aborting due to 1 previous error

@rust-bors

rust-bors Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

💔 Test for dac4ab0 failed: CI. Failed jobs:

@clarfonthey

Copy link
Copy Markdown
Contributor

@bors try jobs=msvc

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 28, 2026
Add .seek_read_buf_exact() to std::os::windows::fs::FileExt


try-job: *msvc*
@rust-bors

rust-bors Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 82f5ae4 (82f5ae4ee7cdbd471d764ae6b4cf978cf82e7452)
Base parent: 77027b6 (77027b64d82d1e92f9ce2ea9042081c4567f5524)

@json420

json420 commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

@clarfonthey Thank you for your patience on this! Looks like it succeeded finally.

@clarfonthey

Copy link
Copy Markdown
Contributor

@bors r+ rollup

Second time's a charm

@rust-bors

rust-bors Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 67cb4ce has been approved by clarfonthey

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Sep 28, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 29, 2026
…rfonthey

Add .seek_read_buf_exact() to std::os::windows::fs::FileExt

Tracking issue: rust-lang#163183

This adds a `seek_read_buf_exact()` method to `std::os::windows::fs::FileExt` based on the `read_buf_exact_at()` method in `std::os::unix::fs::FileExt`.

And this adds a test for `seek_read_buf_exact()` based on the test for `seek_read_buf()`.

This extends the work in rust-lang#140771 which added `seek_read_buf()` and the work in rust-lang#162868 which added `seek_read_exact()` and `seek_write_all()` methods to  `std::os::windows::fs::FileExt`.

No LLMs were used in writing this PR.
rust-bors Bot pushed a commit that referenced this pull request Sep 29, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #162655 (next solver: prefer to select impl candidates over global where-clause candidates)
 - #162832 (add `Div` and `Mul` for `Complex<{float}>`)
 - #162862 (Fix intra doc link resolution when a doc comment is composed of both inner and outer doc comment)
 - #163024 (Add `Dir` equivalents of `fs::metadata` & `fs::symlink_metadata`)
 - #163200 (make `RustaceansAreAwesome` satisfy trait bounds)
 - #163210 (std: split stack overflow module)
 - #163331 (Move `Arc` and `Rc` into `rcs` mod)
 - #163183 (Add .seek_read_buf_exact() to std::os::windows::fs::FileExt)
 - #163450 (Force the correct type variable to never for method resolution on an adjusted never type)
rust-bors Bot pushed a commit that referenced this pull request Sep 29, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #158997 (Avoid recording unnameable `extern crate` aliases in diagnostic metadata)
 - #162655 (next solver: prefer to select impl candidates over global where-clause candidates)
 - #162832 (add `Div` and `Mul` for `Complex<{float}>`)
 - #162862 (Fix intra doc link resolution when a doc comment is composed of both inner and outer doc comment)
 - #163200 (make `RustaceansAreAwesome` satisfy trait bounds)
 - #163210 (std: split stack overflow module)
 - #163331 (Move `Arc` and `Rc` into `rcs` mod)
 - #163183 (Add .seek_read_buf_exact() to std::os::windows::fs::FileExt)
 - #163450 (Force the correct type variable to never for method resolution on an adjusted never type)
@rust-bors
rust-bors Bot merged commit 5d02c7f into rust-lang:main Sep 29, 2026
14 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Sep 29, 2026
rust-bors Bot pushed a commit that referenced this pull request Sep 29, 2026
Rollup merge of #163183 - json420:seek_read_buf_exact, r=clarfonthey

Add .seek_read_buf_exact() to std::os::windows::fs::FileExt

Tracking issue: #163183

This adds a `seek_read_buf_exact()` method to `std::os::windows::fs::FileExt` based on the `read_buf_exact_at()` method in `std::os::unix::fs::FileExt`.

And this adds a test for `seek_read_buf_exact()` based on the test for `seek_read_buf()`.

This extends the work in #140771 which added `seek_read_buf()` and the work in #162868 which added `seek_read_exact()` and `seek_write_all()` methods to  `std::os::windows::fs::FileExt`.

No LLMs were used in writing this PR.
pull Bot pushed a commit to LeeeeeeM/miri that referenced this pull request Sep 30, 2026
Add .seek_read_buf_exact() to std::os::windows::fs::FileExt

Tracking issue: rust-lang/rust#163183

This adds a `seek_read_buf_exact()` method to `std::os::windows::fs::FileExt` based on the `read_buf_exact_at()` method in `std::os::unix::fs::FileExt`.

And this adds a test for `seek_read_buf_exact()` based on the test for `seek_read_buf()`.

This extends the work in rust-lang/rust#140771 which added `seek_read_buf()` and the work in rust-lang/rust#162868 which added `seek_read_exact()` and `seek_write_all()` methods to  `std::os::windows::fs::FileExt`.

No LLMs were used in writing this PR.
pull Bot pushed a commit to LeeeeeeM/miri that referenced this pull request Sep 30, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#158997 (Avoid recording unnameable `extern crate` aliases in diagnostic metadata)
 - rust-lang/rust#162655 (next solver: prefer to select impl candidates over global where-clause candidates)
 - rust-lang/rust#162832 (add `Div` and `Mul` for `Complex<{float}>`)
 - rust-lang/rust#162862 (Fix intra doc link resolution when a doc comment is composed of both inner and outer doc comment)
 - rust-lang/rust#163200 (make `RustaceansAreAwesome` satisfy trait bounds)
 - rust-lang/rust#163210 (std: split stack overflow module)
 - rust-lang/rust#163331 (Move `Arc` and `Rc` into `rcs` mod)
 - rust-lang/rust#163183 (Add .seek_read_buf_exact() to std::os::windows::fs::FileExt)
 - rust-lang/rust#163450 (Force the correct type variable to never for method resolution on an adjusted never type)
bjorn3 pushed a commit to rust-lang/rustc_codegen_cranelift that referenced this pull request Sep 30, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#158997 (Avoid recording unnameable `extern crate` aliases in diagnostic metadata)
 - rust-lang/rust#162655 (next solver: prefer to select impl candidates over global where-clause candidates)
 - rust-lang/rust#162832 (add `Div` and `Mul` for `Complex<{float}>`)
 - rust-lang/rust#162862 (Fix intra doc link resolution when a doc comment is composed of both inner and outer doc comment)
 - rust-lang/rust#163200 (make `RustaceansAreAwesome` satisfy trait bounds)
 - rust-lang/rust#163210 (std: split stack overflow module)
 - rust-lang/rust#163331 (Move `Arc` and `Rc` into `rcs` mod)
 - rust-lang/rust#163183 (Add .seek_read_buf_exact() to std::os::windows::fs::FileExt)
 - rust-lang/rust#163450 (Force the correct type variable to never for method resolution on an adjusted never type)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-windows Operating system: Windows 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