Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
std::os: Handle FormatMessage failure
`FormatMessageW()` is called by `std::os::last_os_error()` to convert errno into string, but the function may fail on non-english locale. I don't know why it fails, but anyway it's better to return errno than to `fail!()` in the case. Fixes #13075 Fixes #13073
- Loading branch information
cffe9e0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from alexcrichton
at klutzy@cffe9e0
cffe9e0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging klutzy/rust/issue-13075 = cffe9e0 into auto
cffe9e0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
klutzy/rust/issue-13075 = cffe9e0 merged ok, testing candidate = 5e8e1b5
cffe9e0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/4822
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/4818
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/3915
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/3923
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/4921
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/4009
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/4016
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/4923
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/4009
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/4014
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/4082
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/1813
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/4920
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/4020
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/4028
success: http://buildbot.rust-lang.org/builders/auto-bsd-64-opt/builds/4682
cffe9e0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = 5e8e1b5