]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Auto merge of #95469 - ChrisDenton:unsound-read-write, r=joshtriplett
authorbors <bors@rust-lang.org>
Wed, 6 Apr 2022 01:23:08 +0000 (01:23 +0000)
committerbors <bors@rust-lang.org>
Wed, 6 Apr 2022 01:23:08 +0000 (01:23 +0000)
commit26b5e0cbb95ce5b1cbf91d49fb45d122479e3363
tree905fd9705e209bfa9738bf7259f37df34e73988f
parentbbe9d27b8ff36da56638aa43d6d0cdfdf89a4e57
parentd2ce150c8c28b69bf406deb0920fcb4ca0d950ae
Auto merge of #95469 - ChrisDenton:unsound-read-write, r=joshtriplett

Fix unsound `File` methods

This is a draft attempt to fix #81357. *EDIT*: this PR now tackles `read()`, `write()`, `read_at()`, `write_at()` and `read_buf`. Still needs more testing though.

cc `@jstarks,` can you confirm the the Windows team is ok with the Rust stdlib using `NtReadFile` and `NtWriteFile`?

~Also, I'm provisionally using `CancelIo` in a last ditch attempt to recover but I'm not sure that this is actually a good idea. Especially as getting into this state would be a programmer error so aborting the process is justified in any case.~ *EDIT*: removed, see comments.