SIGN IN SIGN UP

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: rust-lang/rust#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.
J
Jonathan Brouwer committed
02d9b6368450c6c902f7fedbdd6e3b75d421ff4f
Committed by GitHub <noreply@github.com> on 8/12/2026, 10:06:16 AM