Skip to content

Fix improper stability of Write for Cursor<W: WriteThroughCursor> - #160952

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

Fix improper stability of Write for Cursor<W: WriteThroughCursor>#160952
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
bushrat011899:write_for_cursor_stability_fix

Conversation

@bushrat011899

@bushrat011899 bushrat011899 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Was already stable when using explicit types (e.g. Vec<u8>). WriteThroughCursor is still unstable/hidden.

Tracking Issue: #154046
Zulip Discussion: #general > ✔ CI Failure With and Without Stability Attribute

Description

Fixes an oversight in how the Write for Cursor<W: WriteThroughCursor> implementation was written. While core::io was unstable, a stability attribute for this implementation was not required. However, once that module is marked as stable (even when Cursor and Write are not publicly stably exported), a stability attribute is required. Since Write and Cursor are both stable items (just not stable to access via core::io), the implementation must be marked as stable.

While it is possible to use #[unstable_feature_bound(core_io)] to allow that implementation to be unstable, we do need users to have access to it stably, since it is how implementations such as Write for Cursor<Vec<u8>> are accessed. This is also why this implementation is marked as stable since 1.0.0, since that is the earliest downstream implementation we must permit.


Notes

  • No AI tooling of any kind was used during the creation of this PR.

Was already stable when using explicit types (e.g. `Vec<u8>`). `WriteThroughCursor` is still unstable/hidden.
@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 Aug 12, 2026
@rustbot

rustbot commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

r? @clarfonthey

rustbot has assigned @clarfonthey.
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: libs
  • libs expanded to 12 candidates
  • Random selection from JohnTitor, Mark-Simulacrum, clarfonthey, nia-e

@clarfonthey

Copy link
Copy Markdown
Contributor

@bors r+ rollup

Thank you!

@rust-bors

rust-bors Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 8cbe25f 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 Aug 12, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 12, 2026
…bility_fix, r=clarfonthey

Fix improper stability of `Write for Cursor<W: WriteThroughCursor>`

Was already stable when using explicit types (e.g. `Vec<u8>`). `WriteThroughCursor` is still unstable/hidden.

Tracking Issue: rust-lang#154046
Zulip Discussion: [#general > ✔ CI Failure With and Without Stability Attribute](https://rust-lang.zulipchat.com/#narrow/channel/122651-general/topic/.E2.9C.94.20CI.20Failure.20With.20and.20Without.20Stability.20Attribute/with/615974133)

# Description

Fixes an oversight in how the `Write for Cursor<W: WriteThroughCursor>` implementation was written. While `core::io` was unstable, a stability attribute for this implementation was not required. However, once that module is marked as stable (even when `Cursor` and `Write` are not publicly stably exported), a stability attribute is required. Since `Write` and `Cursor` are both stable items (just not stable to access via `core::io`), the implementation must be marked as stable.

While it is possible to use [#[unstable_feature_bound(core_io)]](https://rustc-dev-guide.rust-lang.org/stability.html#unstable_feature_bound) to allow that implementation to be unstable, we do need users to have access to it stably, since it is how implementations such as `Write for Cursor<Vec<u8>>` are accessed. This is also why this implementation is marked as stable since `1.0.0`, since that is the earliest downstream implementation we must permit.

---

## Notes

- No AI tooling of any kind was used during the creation of this PR.
rust-bors Bot pushed a commit that referenced this pull request Aug 12, 2026
…uwer

Rollup of 3 pull requests

Successful merges:

 - #160900 (Ensure that restriction paths are ancestors)
 - #160890 (Disable some tests for ohos target)
 - #160952 (Fix improper stability of `Write for Cursor<W: WriteThroughCursor>`)
rust-bors Bot pushed a commit that referenced this pull request Aug 12, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #160900 (Ensure that restriction paths are ancestors)
 - #155846 (tests/ui/tuple: add annotations for reference rules)
 - #160890 (Disable some tests for ohos target)
 - #160952 (Fix improper stability of `Write for Cursor<W: WriteThroughCursor>`)
 - #160970 (Fix handling of relative paths starting with a dot in bootstrap)
@rust-bors
rust-bors Bot merged commit 02d9b63 into rust-lang:main Aug 12, 2026
13 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Aug 12, 2026
rust-timer added a commit that referenced this pull request Aug 12, 2026
Rollup merge of #160952 - bushrat011899:write_for_cursor_stability_fix, r=clarfonthey

Fix improper stability of `Write for Cursor<W: WriteThroughCursor>`

Was already stable when using explicit types (e.g. `Vec<u8>`). `WriteThroughCursor` is still unstable/hidden.

Tracking Issue: #154046
Zulip Discussion: [#general > ✔ CI Failure With and Without Stability Attribute](https://rust-lang.zulipchat.com/#narrow/channel/122651-general/topic/.E2.9C.94.20CI.20Failure.20With.20and.20Without.20Stability.20Attribute/with/615974133)

# Description

Fixes an oversight in how the `Write for Cursor<W: WriteThroughCursor>` implementation was written. While `core::io` was unstable, a stability attribute for this implementation was not required. However, once that module is marked as stable (even when `Cursor` and `Write` are not publicly stably exported), a stability attribute is required. Since `Write` and `Cursor` are both stable items (just not stable to access via `core::io`), the implementation must be marked as stable.

While it is possible to use [#[unstable_feature_bound(core_io)]](https://rustc-dev-guide.rust-lang.org/stability.html#unstable_feature_bound) to allow that implementation to be unstable, we do need users to have access to it stably, since it is how implementations such as `Write for Cursor<Vec<u8>>` are accessed. This is also why this implementation is marked as stable since `1.0.0`, since that is the earliest downstream implementation we must permit.

---

## Notes

- No AI tooling of any kind was used during the creation of 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-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.

3 participants