Skip to content

Move std::io::Cursor to core::io#156428

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
bushrat011899:core_io_cursor
May 12, 2026
Merged

Move std::io::Cursor to core::io#156428
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
bushrat011899:core_io_cursor

Conversation

@bushrat011899
Copy link
Copy Markdown
Contributor

@bushrat011899 bushrat011899 commented May 11, 2026

View all comments

ACP: rust-lang/libs-team#755
Tracking issue: #154046
Subset of: #154684

Description

Moves std::io::Cursor to core::io, leaving the IO trait implementations behind. They will be moved along with the traits themselves. Certain documentation links had to be amended, and a private/unstable into_parts_mut method was added to allow the internals to remain private.


Notes

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels May 11, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 11, 2026

r? @nia-e

rustbot has assigned @nia-e.
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 8 candidates
  • Random selection from Mark-Simulacrum, nia-e

@rust-log-analyzer

This comment has been minimized.

Copy link
Copy Markdown
Member

@nia-e nia-e left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good modulo a nit, thanks!

View changes since this review

Comment thread library/core/src/io/cursor.rs
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 12, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 12, 2026

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@bushrat011899
Copy link
Copy Markdown
Contributor Author

@rustbot ready

Pending CI passing, but only added a #[inline] so I'm not expecting a failure.

@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 May 12, 2026
@nia-e
Copy link
Copy Markdown
Member

nia-e commented May 12, 2026

@bors r+

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 12, 2026

📌 Commit e9125c6 has been approved by nia-e

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 1000. This pull request will be tested once the tree is reopened.

@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 May 12, 2026
rust-bors Bot pushed a commit that referenced this pull request May 12, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #156287 (move more compiler crates away from `box_patterns` )
 - #156428 (Move `std::io::Cursor` to `core::io`)
 - #156431 (Move `std::io::util` to `core::io`)
 - #156145 (Move tests cast)
 - #156284 (resolve: Fix a false positive "cannot reexport" error for ambiguous glob sets)
 - #156502 (Give an example of a Ctor in the doc-comments)
rust-bors Bot pushed a commit that referenced this pull request May 12, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #156287 (move more compiler crates away from `box_patterns` )
 - #156428 (Move `std::io::Cursor` to `core::io`)
 - #156431 (Move `std::io::util` to `core::io`)
 - #156145 (Move tests cast)
 - #156284 (resolve: Fix a false positive "cannot reexport" error for ambiguous glob sets)
 - #156502 (Give an example of a Ctor in the doc-comments)
@rust-bors rust-bors Bot merged commit 5a38b67 into rust-lang:main May 12, 2026
11 checks passed
@rustbot rustbot added this to the 1.97.0 milestone May 12, 2026
rust-timer added a commit that referenced this pull request May 12, 2026
Rollup merge of #156428 - bushrat011899:core_io_cursor, r=nia-e

Move `std::io::Cursor` to `core::io`

ACP: rust-lang/libs-team#755
Tracking issue: #154046
Subset of: #154684

## Description

Moves `std::io::Cursor` to `core::io`, leaving the IO trait implementations behind. They will be moved along with the traits themselves. Certain documentation links had to be amended, and a private/unstable `into_parts_mut` method was added to allow the internals to remain private.

---

## Notes

* This can be reviewed independently of the other PRs tracked in #154046.
* No AI tooling of any kind was used during the creation of this PR.
@Mark-Simulacrum
Copy link
Copy Markdown
Member

@rust-timer build 4430d4c

cc #156506 (comment)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (4430d4c): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

Benchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up.

@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.1% [0.0%, 0.1%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.1%] 3
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -1.5%, secondary 0.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.6% [0.8%, 2.5%] 2
Improvements ✅
(primary)
-1.5% [-2.4%, -0.9%] 3
Improvements ✅
(secondary)
-2.1% [-2.1%, -2.1%] 1
All ❌✅ (primary) -1.5% [-2.4%, -0.9%] 3

Cycles

Results (primary -1.9%, secondary 3.9%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.9% [3.3%, 5.4%] 4
Improvements ✅
(primary)
-1.9% [-1.9%, -1.9%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.9% [-1.9%, -1.9%] 1

Binary size

Results (secondary 0.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.1% [0.1%, 0.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Bootstrap: 510.527s -> 508.357s (-0.43%)
Artifact size: 400.06 MiB -> 398.05 MiB (-0.50%)

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-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.

6 participants