summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/declare.rs
diff options
context:
space:
mode:
authorTrevor Gross <t.gross35@gmail.com>2024-09-24 19:47:52 -0400
committerGitHub <noreply@github.com>2024-09-24 19:47:52 -0400
commit9737f923e2de6e66a692a4c260ed5313ff399386 (patch)
tree96f5ef36d9984856eee7be946b8bfa653aa1ae55 /compiler/rustc_codegen_llvm/src/declare.rs
parent7de108277b9e8641e5a2d7210a8588059061838f (diff)
parent2fdeb3b8f4cb91eb545880cc0b5db003ef4869b7 (diff)
downloadrust-9737f923e2de6e66a692a4c260ed5313ff399386.tar.gz
rust-9737f923e2de6e66a692a4c260ed5313ff399386.zip
Rollup merge of #130798 - lukas-code:doc-stab, r=notriddle
rustdoc: inherit parent's stability where applicable

It is currently not possible for a re-export to have a different stability (https://github.com/rust-lang/rust/issues/30827). Therefore the standard library uses a hack when moving items like `std::error::Error` or `std::net::IpAddr` into `core` by marking the containing module (`core::error` / `core::net`) as unstable or stable in a later version than the items the module contains.

Previously, rustdoc would always show the *stability as declared* for an item rather than the *stability as publicly reachable* (i.e. the features required to actually access the item), which could be confusing when viewing the docs. This PR changes it so that we show the stability of the first unstable parent or the most recently stabilized parent instead, to hopefully make things less confusing.

fixes https://github.com/rust-lang/rust/issues/130765

screenshots:
![error in std](https://github.com/user-attachments/assets/2ab9bdb9-ed81-4e45-a832-ac7d3ba1be3f) ![error in core](https://github.com/user-attachments/assets/46f46182-5642-4ac5-b92e-0b99a8e2496d)
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/declare.rs')
0 files changed, 0 insertions, 0 deletions