Skip to content

Move std::io::Write to core::io#158541

Open
bushrat011899 wants to merge 8 commits into
rust-lang:mainfrom
bushrat011899:core_io_write
Open

Move std::io::Write to core::io#158541
bushrat011899 wants to merge 8 commits into
rust-lang:mainfrom
bushrat011899:core_io_write

Conversation

@bushrat011899

@bushrat011899 bushrat011899 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

View all comments

ACP: rust-lang/libs-team#755
Tracking issue: #154046
Split From: #156527
Blocked On: #158537
Blocked On: #158540

Description

Moves std::io::Write to core::io. This is effectively a direct cut and paste, but with a large diff due to how many implementations need to be moved into alloc and core. Blocked on #158537 and #158540.


Notes

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 29, 2026
@rustbot

rustbot commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

r? @Darksonn

rustbot has assigned @Darksonn.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 13 candidates
  • Random selection from 6 candidates

@bushrat011899

Copy link
Copy Markdown
Contributor Author

@rustbot blocked

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 29, 2026
@bushrat011899 bushrat011899 force-pushed the core_io_write branch 2 times, most recently from ec21a69 to c806329 Compare July 3, 2026 01:49
@rust-bors

This comment has been minimized.

@rustbot

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot

This comment has been minimized.

@bushrat011899

Copy link
Copy Markdown
Contributor Author

@rustbot ready
@clarfonthey This is the next PR in my chain if you're interested in reviewing this one too! I'm not assigning you just in case you don't want to take it on.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Jul 6, 2026
@clarfonthey

Copy link
Copy Markdown
Contributor

r? clarfonthey

@rustbot rustbot assigned clarfonthey and unassigned Darksonn Jul 7, 2026
Comment thread library/core/src/io/write.rs
Comment thread library/core/src/io/cursor.rs Outdated
@bushrat011899 bushrat011899 requested a review from clarfonthey July 7, 2026 01:25
Comment thread library/alloc/src/io/impls.rs Outdated
@rustbot

rustbot commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@bushrat011899

Copy link
Copy Markdown
Contributor Author

@rustbot ready

A handful of pub(crate) functions that were previously always used in std become conditionally used once Read/Write/etc. are moved to core/alloc. I've marked those functions as #[allow(unused_imports)] to avoid changing the various callsites or adding a brittle cfg(...) to their reexport.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 8, 2026
@bushrat011899

Copy link
Copy Markdown
Contributor Author

auto - dist-various-2 was the CI task that failed during the merge. So it might be worth a "bors try dist-various-2"?

@clarfonthey

Copy link
Copy Markdown
Contributor

@bors try jobs=dist-various-2

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 8, 2026
Move `std::io::Write` to `core::io`


try-job: dist-various-2
@rust-bors

rust-bors Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: f09a32d (f09a32d2764485e529832b5fd3cb8c1d59e99bd9)
Base parent: c290daa (c290daa1e5274a52e54a0f49e31bd70192abc606)

@clarfonthey

Copy link
Copy Markdown
Contributor

@bors r+ rollup=iffy

For previous reasons of modifying a lot of I/O code and also having failed once, despite passing try now.

@rust-bors

rust-bors Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

📌 Commit cb09bff has been approved by clarfonthey

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 8, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 8, 2026
…rfonthey

Move `std::io::Write` to `core::io`

ACP: rust-lang/libs-team#755
Tracking issue: rust-lang#154046
Split From: rust-lang#156527
~~Blocked On: rust-lang#158537
~~Blocked On: rust-lang#158540

## Description

Moves `std::io::Write` to `core::io`. This is effectively a direct cut and paste, but with a large diff due to how many implementations need to be moved into `alloc` and `core`. Blocked on rust-lang#158537 and rust-lang#158540.

---

## Notes

* No AI tooling of any kind was used during the creation of this PR.
* Please see rust-lang#154046 (comment) for a review order and broader context for this PR.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 8, 2026
…rfonthey

Move `std::io::Write` to `core::io`

ACP: rust-lang/libs-team#755
Tracking issue: rust-lang#154046
Split From: rust-lang#156527
~~Blocked On: rust-lang#158537
~~Blocked On: rust-lang#158540

## Description

Moves `std::io::Write` to `core::io`. This is effectively a direct cut and paste, but with a large diff due to how many implementations need to be moved into `alloc` and `core`. Blocked on rust-lang#158537 and rust-lang#158540.

---

## Notes

* No AI tooling of any kind was used during the creation of this PR.
* Please see rust-lang#154046 (comment) for a review order and broader context for this PR.
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 8, 2026
…rfonthey

Move `std::io::Write` to `core::io`

ACP: rust-lang/libs-team#755
Tracking issue: rust-lang#154046
Split From: rust-lang#156527
~~Blocked On: rust-lang#158537
~~Blocked On: rust-lang#158540

## Description

Moves `std::io::Write` to `core::io`. This is effectively a direct cut and paste, but with a large diff due to how many implementations need to be moved into `alloc` and `core`. Blocked on rust-lang#158537 and rust-lang#158540.

---

## Notes

* No AI tooling of any kind was used during the creation of this PR.
* Please see rust-lang#154046 (comment) for a review order and broader context for this PR.
rust-bors Bot pushed a commit that referenced this pull request Jul 8, 2026
Rollup of 25 pull requests

Successful merges:

 - #158871 (add relnotes for 1.97.0)
 - #158968 (stdarch subtree update)
 - #157690 (codegen_ssa: pack small const aggregates into immediate stores)
 - #158541 (Move `std::io::Write` to `core::io`)
 - #154445 (rustdoc: Represent `--output-format=json` coverage and ir differently)
 - #156370 (Reject linked dylib EII default overrides)
 - #157153 (allow `Allocator`s to be used as `#[global_allocator]`s)
 - #158495 (Rename HAS_CT_PROJECTION to HAS_CONST_ALIAS)
 - #158617 (allow mGCA const arguments to fall back to anon consts)
 - #158645 (Fix splat ICEs and ban it in closures)
 - #158655 (Fix coroutine MIR saved local remapping)
 - #158666 (Carry the `b_offset` inside `BackendRepr::ScalarPair`)
 - #158870 (std: merge the unix-like io::error modules into one file)
 - #158920 (Update wasm-component-ld to 0.5.26)
 - #158926 (wrapping_sh* methods: clarify underspecified reference)
 - #158927 (add core test run with `-Zforce-intrinsic-fallback`)
 - #158932 (Do not build the compiler when invoking `x perf compare`)
 - #158937 (Emit the emscripten entry point as `__main_argc_argv`)
 - #151379 (Stabilize `VecDeque::retain_back` from `truncate_front`)
 - #156144 (Better docs for PartialEq (includes macro rename))
 - #156548 ( Library support for aarch64-unknown-linux-pauthtest target)
 - #158307 (CI job for parallel frontend ui tests)
 - #158347 (Improve generic parameters handling for #[diagnostic::on_const])
 - #158722 (delegation: do not always inherit `ConstArgHasType` predicates)
 - #158741 (Simplify `Option::into_flat_iter` signature)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 9, 2026
…rfonthey

Move `std::io::Write` to `core::io`

ACP: rust-lang/libs-team#755
Tracking issue: rust-lang#154046
Split From: rust-lang#156527
~~Blocked On: rust-lang#158537
~~Blocked On: rust-lang#158540

## Description

Moves `std::io::Write` to `core::io`. This is effectively a direct cut and paste, but with a large diff due to how many implementations need to be moved into `alloc` and `core`. Blocked on rust-lang#158537 and rust-lang#158540.

---

## Notes

* No AI tooling of any kind was used during the creation of this PR.
* Please see rust-lang#154046 (comment) for a review order and broader context for this PR.
rust-bors Bot pushed a commit that referenced this pull request Jul 9, 2026
…uwer

Rollup of 17 pull requests

Successful merges:

 - #158510 (Enable `static_position_independent_executables` on all gnu and musl targets)
 - #158541 (Move `std::io::Write` to `core::io`)
 - #158899 (Fix `unaligned_volatile_store` by removing `MemFlags::UNALIGNED`)
 - #155429 (Support `u128`/`i128` c-variadic arguments)
 - #156370 (Reject linked dylib EII default overrides)
 - #157153 (allow `Allocator`s to be used as `#[global_allocator]`s)
 - #158535 (Support `#[track_caller]` on EII declarations)
 - #158617 (allow mGCA const arguments to fall back to anon consts)
 - #158645 (Fix splat ICEs and ban it in closures)
 - #158988 (Redo `TokenStreamIter`)
 - #158347 (Improve generic parameters handling for #[diagnostic::on_const])
 - #158722 (delegation: do not always inherit `ConstArgHasType` predicates)
 - #158739 (view-types: HIR lowering)
 - #158883 (tests: fix enum-match.rs to handle LLVM 23)
 - #158886 (Add documentation for the `no_std` attribute)
 - #158951 (Merge three `MaxUniverse`s into one)
 - #158961 (Reapply "LLVM 23: Run AssignGUIDPass in some places")
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 9, 2026
…rfonthey

Move `std::io::Write` to `core::io`

ACP: rust-lang/libs-team#755
Tracking issue: rust-lang#154046
Split From: rust-lang#156527
~~Blocked On: rust-lang#158537
~~Blocked On: rust-lang#158540

## Description

Moves `std::io::Write` to `core::io`. This is effectively a direct cut and paste, but with a large diff due to how many implementations need to be moved into `alloc` and `core`. Blocked on rust-lang#158537 and rust-lang#158540.

---

## Notes

* No AI tooling of any kind was used during the creation of this PR.
* Please see rust-lang#154046 (comment) for a review order and broader context for this PR.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 9, 2026
…rfonthey

Move `std::io::Write` to `core::io`

ACP: rust-lang/libs-team#755
Tracking issue: rust-lang#154046
Split From: rust-lang#156527
~~Blocked On: rust-lang#158537
~~Blocked On: rust-lang#158540

## Description

Moves `std::io::Write` to `core::io`. This is effectively a direct cut and paste, but with a large diff due to how many implementations need to be moved into `alloc` and `core`. Blocked on rust-lang#158537 and rust-lang#158540.

---

## Notes

* No AI tooling of any kind was used during the creation of this PR.
* Please see rust-lang#154046 (comment) for a review order and broader context for this PR.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 9, 2026
…rfonthey

Move `std::io::Write` to `core::io`

ACP: rust-lang/libs-team#755
Tracking issue: rust-lang#154046
Split From: rust-lang#156527
~~Blocked On: rust-lang#158537
~~Blocked On: rust-lang#158540

## Description

Moves `std::io::Write` to `core::io`. This is effectively a direct cut and paste, but with a large diff due to how many implementations need to be moved into `alloc` and `core`. Blocked on rust-lang#158537 and rust-lang#158540.

---

## Notes

* No AI tooling of any kind was used during the creation of this PR.
* Please see rust-lang#154046 (comment) for a review order and broader context for this PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants