about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src/errors.rs
diff options
context:
space:
mode:
authorJubilee <46493976+workingjubilee@users.noreply.github.com>2024-07-21 17:44:27 -0700
committerGitHub <noreply@github.com>2024-07-21 17:44:27 -0700
commit6af66e836f0bcc497859dc37b397df89ddc69eac (patch)
treedc472694830eefed77fe4bc5df03785bc7ab8a39 /compiler/rustc_pattern_analysis/src/errors.rs
parent92c6c03805408a1a261b98013304e9bbf59ee428 (diff)
parentae42efc522a5ed43631b95f1cce80520c7929e15 (diff)
downloadrust-6af66e836f0bcc497859dc37b397df89ddc69eac.tar.gz
rust-6af66e836f0bcc497859dc37b397df89ddc69eac.zip
Rollup merge of #127583 - Nilstrieb:invalid-utf8, r=joboet
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 � 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`.

fixes #127563
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/errors.rs')
0 files changed, 0 insertions, 0 deletions