about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-11-02 07:58:38 +0000
committerbors <bors@rust-lang.org>2023-11-02 07:58:38 +0000
commit46455dc65069387f2dc46612f13fd45452ab301a (patch)
tree560e541799c5d7cabb2859212c44a4e3f704bf93 /compiler/rustc_codegen_llvm/src
parent42e1e1208b886962a3bf645e4426e38ea4ef4884 (diff)
parent4971e997e576aaeec268fed76aa61a033ad67870 (diff)
downloadrust-46455dc65069387f2dc46612f13fd45452ab301a.tar.gz
rust-46455dc65069387f2dc46612f13fd45452ab301a.zip
Auto merge of #117386 - roblabla:fix-switch-stdio-win7, r=ChrisDenton
Fix switch_stdout_to on Windows7

The `switch_stdout_to` test was broken on Windows7, as deleting the temporary test folder would fail since the `switch-stdout-output` file we redirected the stdout to is never closed, and it's impossible on Win7 to delete an opened file.

To fix this issue, we make `switch_stdout_to` return the previous handle. Using this, we add a new `switch_stdout_to` call at the end of the test to return the stdio handles to their original state, and recover the handle to the file we opened. This handle is automatically closed at the end of the function, which should allow the temporary test folder to be deleted properly.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions