Skip to content

Commit 64fd961

Browse files
authored
Unrolled build for #145335
Rollup merge of #145335 - clarfonthey:wtf8-core-alloc, r=Mark-Simulacrum Move WTF-8 code from std into core and alloc This is basically a small portion of #129411 with a smaller scope. It *does not*\* affect any public APIs; this code is still internal to the standard library. It just moves the WTF-8 code into `core` and `alloc` so it can be accessed by `no_std` crates like `backtrace`. > \* The only public API this affects is by adding a `Debug` implementation to `std::os::windows::ffi::EncodeWide`, which was not present before. This is due to the fact that `core` requires `Debug` implementations for all types, but `std` does not (yet) require this. Even though this was ultimately changed to be a wrapper over the original type, not a re-export, I decided to keep the `Debug` implementation so it remains useful. Like we do with ordinary strings, the tests are still located entirely in `alloc`, rather than splitting them into `core` and `alloc`. ---- Reviewer note: for ease of review, this is split into three commits: 1. Moving the original files into their new "locations" 2. Actually modifying the code to compile. 3. Removing aesthetic changes that were made so that the diff for commit 2 was readable. You can review commits 1 and 3 to verify these claims, but commit 2 contains the majority of the changes you should care about. ---- API changes: `impl Debug for std::os::windows::ffi::EncodeWide`
2 parents 269d5b5 + 7c81a06 commit 64fd961

File tree

16 files changed

+1327
-1208
lines changed

16 files changed

+1327
-1208
lines changed

library/alloc/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@
159159
#![feature(unicode_internals)]
160160
#![feature(unsize)]
161161
#![feature(unwrap_infallible)]
162+
#![feature(wtf8_internals)]
162163
// tidy-alphabetical-end
163164
//
164165
// Language features:
@@ -232,6 +233,8 @@ pub mod sync;
232233
#[cfg(all(not(no_global_oom_handling), not(no_rc), not(no_sync)))]
233234
pub mod task;
234235
pub mod vec;
236+
#[cfg(all(not(no_rc), not(no_sync), not(no_global_oom_handling)))]
237+
pub mod wtf8;
235238

236239
#[doc(hidden)]
237240
#[unstable(feature = "liballoc_internals", issue = "none", reason = "implementation detail")]

0 commit comments

Comments
 (0)