diff options
| author | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2024-07-10 19:42:54 +0200 |
|---|---|---|
| committer | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2024-07-21 13:22:03 +0200 |
| commit | ae42efc522a5ed43631b95f1cce80520c7929e15 (patch) | |
| tree | 19488dd3e873c93b15e0c356d53aa12c4728fbcf /compiler/rustc_pattern_analysis/src | |
| parent | 98dcbae5c9ac615d5acfbf42d42b19a77cb9ec11 (diff) | |
| download | rust-ae42efc522a5ed43631b95f1cce80520c7929e15.tar.gz rust-ae42efc522a5ed43631b95f1cce80520c7929e15.zip | |
Deal with invalid UTF-8 from `gai_strerror`
When the system is using a non-UTF-8 locale, the value will indeed not be UTF-8. That sucks for everyone involved, but is no reason for panic. We can "handle" this gracefully by just using from lossy, replacing the invalid UTF-8 with the ? and keeping the accidentally valid UTF-8. Good luck when debugging, but at least it's not a crash. We already do this for `strerror_r`.
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
0 files changed, 0 insertions, 0 deletions
