Skip to content

remove NOP File::flush from fs tests - #165739

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
RalfJung:file-flush
Nov 10, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
RalfJung:file-flush

Conversation

@RalfJung

@RalfJung RalfJung commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

They were added by @ChrisDenton in #116438 and by @Qelxiros in #150679 and #160533. However, File::flush is documented to be a NOP:

rust/library/std/src/fs.rs

Lines 1446 to 1461 in 37bc46f

/// Flushes the file, ensuring that all intermediately buffered contents
/// reach their destination.
///
/// See [`Write::flush`] docs for more info.
///
/// # Platform-specific behavior
///
/// Since a `File` structure doesn't contain any buffers, this function is
/// currently a no-op on Unix and Windows. Note that this [may change in
/// the future][changes].
///
/// [changes]: io#platform-specific-behavior
#[inline]
fn flush(&mut self) -> io::Result<()> {
self.inner.flush()
}

@rustbot rustbot added A-filesystem Area: `std::fs` 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 Nov 10, 2026
@rustbot

rustbot commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
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 38 candidates
  • Random selection from JohnTitor, Mark-Simulacrum, maxdexh

@ChrisDenton

Copy link
Copy Markdown
Member

r? ChrisDenton
@bors r+ rollup

@rust-bors

rust-bors Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 9adef1b has been approved by ChrisDenton

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 Nov 10, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 10, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 10, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 10, 2026
…uwer

Rollup of 24 pull requests

Successful merges:

 - #165709 (remove 'x miri' smoke test from PR CI)
 - #164217 (Prepare to make `rustc_trivial_field_reads` usable in user code)
 - #165569 (`Move` trait feature gate)
 - #165575 (Upgrade bundled musl to 1.2.6)
 - #163241 (Add enclosing item context when pointing at `FnMut` bound)
 - #163992 (add `core::arch::{x86, x86_64}::x87_f80`)
 - #165047 (Change the span building of paths from first-to-last to chained)
 - #165458 (fix incorrect byte count suffix on MSVC)
 - #165490 (Mark the compile unit for `-Zdebuginfo-for-profiling`)
 - #165586 (Remove `backend_optimization_level`.)
 - #165646 (fix NumScalableVectors::from_field_count)
 - #165655 (Unignore passing GCC backend tests)
 - #165740 (miri subtree update)
 - #165753 (avoid Terminator:None in MIR inliner)
 - #153261 (Partially stabilize `ptr_alignment_type` as `alignment_type`)
 - #164559 (Windows: fix Dir::remove and Dir::rename following symlinks)
 - #165562 (stop using gce in a test)
 - #165681 (Add safety requirements for Pattern and Searcher)
 - #165682 (interpret: ensure newly created unions have uninit in their padding)
 - #165693 (Move `check_attr` to attribute parsing)
 - #165715 (windows: check for null before wide encoding)
 - #165717 (mpsc_sync::stream_send_recv_stress: wait for all threads to finish)
 - #165733 (docs(num): remove needless whitespaces)
 - #165739 (remove NOP File::flush from fs tests)

Failed merges:

 - #165727 (Normalize "beta release channel" in `const-supertrait-unstable` test)
 - #164218 (Tweak private re-export errors to point at correct span and have more context)
rust-bors Bot pushed a commit that referenced this pull request Nov 10, 2026
…uwer

Rollup of 24 pull requests

Successful merges:

 - #165709 (remove 'x miri' smoke test from PR CI)
 - #164217 (Prepare to make `rustc_trivial_field_reads` usable in user code)
 - #165569 (`Move` trait feature gate)
 - #165575 (Upgrade bundled musl to 1.2.6)
 - #163241 (Add enclosing item context when pointing at `FnMut` bound)
 - #163992 (add `core::arch::{x86, x86_64}::x87_f80`)
 - #165047 (Change the span building of paths from first-to-last to chained)
 - #165458 (fix incorrect byte count suffix on MSVC)
 - #165490 (Mark the compile unit for `-Zdebuginfo-for-profiling`)
 - #165586 (Remove `backend_optimization_level`.)
 - #165646 (fix NumScalableVectors::from_field_count)
 - #165655 (Unignore passing GCC backend tests)
 - #165740 (miri subtree update)
 - #165753 (avoid Terminator:None in MIR inliner)
 - #153261 (Partially stabilize `ptr_alignment_type` as `alignment_type`)
 - #164559 (Windows: fix Dir::remove and Dir::rename following symlinks)
 - #165562 (stop using gce in a test)
 - #165681 (Add safety requirements for Pattern and Searcher)
 - #165682 (interpret: ensure newly created unions have uninit in their padding)
 - #165693 (Move `check_attr` to attribute parsing)
 - #165715 (windows: check for null before wide encoding)
 - #165717 (mpsc_sync::stream_send_recv_stress: wait for all threads to finish)
 - #165733 (docs(num): remove needless whitespaces)
 - #165739 (remove NOP File::flush from fs tests)

Failed merges:

 - #165727 (Normalize "beta release channel" in `const-supertrait-unstable` test)
 - #164218 (Tweak private re-export errors to point at correct span and have more context)
@rust-bors
rust-bors Bot merged commit 0806b89 into rust-lang:main Nov 10, 2026
14 checks passed
@rustbot rustbot added this to the 1.102.0 milestone Nov 10, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 10, 2026
Rollup merge of #165739 - RalfJung:file-flush, r=ChrisDenton

remove NOP File::flush from fs tests

They were added by @ChrisDenton in #116438 and by @Qelxiros in #150679 and #160533. However, `File::flush` is documented to be a NOP:

https://github.com/rust-lang/rust/blob/37bc46f797428b9526874e4daac2ac2b41800d6b/library/std/src/fs.rs#L1446-L1461
@RalfJung
RalfJung deleted the file-flush branch November 10, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-filesystem Area: `std::fs` 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