mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-01 01:26:32 +00:00
Move `std::io::Read` to `alloc::io` ACP: https://github.com/rust-lang/libs-team/issues/755 Tracking issue: https://github.com/rust-lang/rust/issues/154046 Split From: https://github.com/rust-lang/rust/pull/156527 ~~Blocked On: https://github.com/rust-lang/rust/pull/158541~~ ## Description Moves `std::io::Read` to `alloc::io`. This is mostly a direct cut and paste, but with a large diff due to how many implementations need to be moved into `alloc`. Blocked on rust-lang/rust#158541. There is some new code written for some of the `Read` implementations to account for the `no_global_oom_handling` configuration, since `Vec::extend_from_slice` and `String::push_str` are unavailable. I've highlighted all of these such instances with review comments for clarity. --- ## Notes * No AI tooling of any kind was used during the creation of this PR. * Please see https://github.com/rust-lang/rust/issues/154046#issuecomment-4416678427 for a review order and broader context for this PR.