about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/snippet.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-11-02 12:14:13 +0100
committerGitHub <noreply@github.com>2024-11-02 12:14:13 +0100
commit90c5f862989c87c0f30466a23293a029e434e323 (patch)
treeffe4d6a6a744879e8acb6e47c9932926915e26af /compiler/rustc_errors/src/snippet.rs
parent6eeb28628935e9445093929e47cdd1872e7bd186 (diff)
parent2a6a70606d3d87484d468d60e3e351c2a9ab6819 (diff)
downloadrust-90c5f862989c87c0f30466a23293a029e434e323.tar.gz
rust-90c5f862989c87c0f30466a23293a029e434e323.zip
Rollup merge of #132482 - lukas-code:stab-attrs, r=Noratrieb
library: fix some stability annotations

This PR updates some stability attributes to correctly reflect when some items actually got stabilized. Found while testing https://github.com/rust-lang/rust/pull/132481.

### `core::char` / `std::char`

In https://github.com/rust-lang/rust/pull/26192, the `core::char` module got "stabilized" for 1.2.0, but the `core` crate itself was still unstable until 1.6.0.

In https://github.com/rust-lang/rust/pull/49698, the `std::char` module was changed to a re-export of `core::char`, making `std::char` appear as "stable since 1.2.0", even though it was already stable in 1.0.0.

By marking `core::char` as stable since 1.0.0, the docs will show correct versions for both `core::char` (since 1.6.0) and `std::char` (since 1.0.0). This is also consistent with the stabilities of similar re-exported modules like `core::mem`/`std::mem` for example.

### `{core,std}::array` and `{core,std}::array::TryFromSliceError`

In https://github.com/rust-lang/rust/pull/58302, the `core::array::TryFromSliceError` type got stabilized for 1.34.0, together with `TryFrom`. At that point the `core::array` module was still unstable and a `std::array` re-export didn't exist, but `core::array::TryFromSliceError` could still be named due to https://github.com/rust-lang/rust/pull/95956 to existing yet.

Then, `core::array` got stabilized and `std::array` got added, first targeting 1.36.0 in https://github.com/rust-lang/rust/pull/60657, but then getting backported for 1.35.0 in https://github.com/rust-lang/rust/pull/60838.

This means that `core::array` and `std::array` actually got stabilized in 1.35.0 and `core::array::TryFromSliceError` was accessible through the unstable module in 1.34.0 -- mark them as such so that the docs display the correct versions.
Diffstat (limited to 'compiler/rustc_errors/src/snippet.rs')
0 files changed, 0 insertions, 0 deletions