about summary refs log tree commit diff
path: root/compiler/rustc_mir/src/transform/coverage/debug.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-12-06 01:15:37 +0000
committerbors <bors@rust-lang.org>2020-12-06 01:15:37 +0000
commitddafcc0b66e04ac4793361d3bd604c8c8a9d16a8 (patch)
tree3699f48cb75d5e3bbd82ef32200dc7d2c3897a8e /compiler/rustc_mir/src/transform/coverage/debug.rs
parentbb0d481b5a9e78145f5644ec46015065fa83b4cc (diff)
parenta9b1381b8dd0704966a5c2ab7e4ca0ff96d05a18 (diff)
downloadrust-ddafcc0b66e04ac4793361d3bd604c8c8a9d16a8.tar.gz
rust-ddafcc0b66e04ac4793361d3bd604c8c8a9d16a8.zip
Auto merge of #79650 - the8472:fix-take, r=dtolnay
Fix incorrect io::Take's limit resulting from io::copy specialization

The specialization introduced in #75272 fails to update `io::Take` wrappers after performing the copy syscalls which bypass those wrappers. The buffer flushing before the copy does update them correctly, but the bytes copied after the initial flush weren't subtracted.

The fix is to subtract the bytes copied from each `Take` in the chain of wrappers, even when an error occurs during the syscall loop. To do so the `CopyResult` enum now has to carry the bytes copied so far in the error case.
Diffstat (limited to 'compiler/rustc_mir/src/transform/coverage/debug.rs')
0 files changed, 0 insertions, 0 deletions