-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rustdoc regression: stable items reexported from unstable modules appear unstable #134702
Comments
One related thing: even though the type can be accessed stably, copying the path via the button gives a path that is only usable with unstable e.g. |
For example, #134692 moves However, a |
The main https://doc.rust-lang.org/1.83.0/std/ffi/index.html#reexports
To fix that, the |
Rollup merge of rust-lang#134791 - notriddle:notriddle/inline-ffi-error-types, r=tgross35 docs: inline `std::ffi::c_str` types to `std::ffi` Rustdoc has no way to show that an item is stable, but only at a different path. `std::ffi::c_str::NulError` is not stable, but `std::ffi::NulError` is. To avoid marking these types as unstable when someone just wants to follow a link from `CString`, inline them into their stable paths. Fixes rust-lang#134702 r? `@tgross35`
Previously, stable items that are reexported from unstable modules (to stable modules) showed up as stable, which is correct because the user has a way to access them. However, since 1.83, they show up as unstable. This is accurate in one sense as they can't be stably accessed via the displayed path but is misleading because the types themselves are actually stably usable.
As an example, here is the most recent documentation from the most recent 1.83, as well as nightly https://doc.rust-lang.org/1.83.0/std/ffi/c_str/struct.FromBytesUntilNulError.html:
From 1.82 https://doc.rust-lang.org/1.82.0/std/ffi/c_str/struct.FromBytesUntilNulError.html:
And then 1.69, before it moved modules https://doc.rust-lang.org/1.69.0/core/ffi/struct.FromBytesUntilNulError.html:
There was a related issue in the near past with method signatures https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/Moving.20to.20a.20module.20breaks.20stability.20indicators
The text was updated successfully, but these errors were encountered: