diff options
| author | Thalia Archibald <thalia@archibald.dev> | 2025-02-27 23:38:19 -0800 |
|---|---|---|
| committer | Thalia Archibald <thalia@archibald.dev> | 2025-02-28 13:42:31 -0800 |
| commit | a8d78fec52aec04254ec602851c4fd7c8469c592 (patch) | |
| tree | 1f81103ee010f69901f5491475f70100e980888b /compiler/rustc_codegen_llvm/src/errors.rs | |
| parent | 287487624357c19b22d27aa3ed584b8ccd080b4d (diff) | |
| download | rust-a8d78fec52aec04254ec602851c4fd7c8469c592.tar.gz rust-a8d78fec52aec04254ec602851c4fd7c8469c592.zip | |
Specialize OsString::push for strings
When concatenating two WTF-8 strings, surrogate pairs at the boundaries need to be joined. However, since UTF-8 strings cannot contain surrogate halves, this check can be skipped when one string is UTF-8. Specialize `OsString::push` to use a more efficient concatenation in this case. Unfortunately, a specialization for `T: AsRef<str>` conflicts with `T: AsRef<OsStr>`, so stamp out string types with a macro.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
