about summary refs log tree commit diff
path: root/tests/rustdoc/source-code-pages/html-no-source.rs
diff options
context:
space:
mode:
authorStuart Cook <Zalathar@users.noreply.github.com>2025-05-02 22:17:00 +1000
committerGitHub <noreply@github.com>2025-05-02 22:17:00 +1000
commit5a58c7a6ab060044399f7886cff330f3ee74c21c (patch)
treee1204106d91d881b6aed3e66ddeeb2870824edde /tests/rustdoc/source-code-pages/html-no-source.rs
parent6fc78d410d506e3c95c6362046f3965810f5ec6d (diff)
parent0f0c0d8b16b265ac57cac9fd50f1dcfe78719a6a (diff)
downloadrust-5a58c7a6ab060044399f7886cff330f3ee74c21c.tar.gz
rust-5a58c7a6ab060044399f7886cff330f3ee74c21c.zip
Rollup merge of #140159 - thaliaarchi:pathbuf-extension, r=workingjubilee
Avoid redundant WTF-8 checks in `PathBuf`

Eliminate checks for WTF-8 boundaries in `PathBuf::set_extension` and `add_extension`, where joining WTF-8 surrogate halves is impossible. Don't convert the `str` to `OsStr`, because `OsString::push` specializes to skip the joining when given strings.

To assist in this, mark the internal methods `OsString::truncate` and `extend_from_slice` as `unsafe` to communicate their safety invariants better than with module privacy.

Similar to #137777.

cc `@joboet` `@ChrisDenton`
Diffstat (limited to 'tests/rustdoc/source-code-pages/html-no-source.rs')
0 files changed, 0 insertions, 0 deletions