diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2024-01-30 11:19:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-30 11:19:18 +0100 |
| commit | d5e8d85249b86e1826bbfc1977759a5a182c6ea8 (patch) | |
| tree | 1bcd2cc8b06d389c3b430c81df872f51b9032472 /compiler/rustc_parse/src | |
| parent | f35504dbf252b2da2ef7303d4bae40953b03247a (diff) | |
| parent | b85b2a783b813def53b2a7f0c9b53fed119e2338 (diff) | |
| download | rust-d5e8d85249b86e1826bbfc1977759a5a182c6ea8.tar.gz rust-d5e8d85249b86e1826bbfc1977759a5a182c6ea8.zip | |
Rollup merge of #120452 - alexcrichton:update-windows-seek-write-docs, r=ChrisDenton
std: Update documentation of seek_write on Windows Currently the documentation of `FileExt::seek_write` on Windows indicates that writes beyond the end of the file leave intermediate bytes uninitialized. This commentary dates back to the original inclusion of these functions in #35704 (wow blast from the past!). At the time the functionality here was implemented using `WriteFile`, but nowadays the `NtWriteFile` method is used instead. The documentation for `NtWriteFile` explicitly states: > If Length and ByteOffset specify a write operation past the current > end-of-file mark, NtWriteFile automatically extends the file and updates > the end-of-file mark; any bytes that are not explicitly written between > such old and new end-of-file marks are defined to be zero. This commentary has had a downstream impact in the `system-interface` crate where it tries to handle this by explicitly writing zeros, but I don't believe that's necessary any more. I'm sending a PR upstream here to avoid future confusion and codify that zeros are written in the intermediate bytes matching what Windows currently provides.
Diffstat (limited to 'compiler/rustc_parse/src')
0 files changed, 0 insertions, 0 deletions
