rust/compiler
Trevor Gross 9737f923e2
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)
2024-09-24 19:47:52 -04:00
..
rustc
rustc_abi Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_arena
rustc_ast Pin memchr to 2.5.0 in the library rather than rustc_ast 2024-09-24 18:09:43 +02:00
rustc_ast_ir
rustc_ast_lowering Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_ast_passes Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_ast_pretty Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_attr rustdoc: inherit parent's stability where applicable 2024-09-24 20:18:36 +02:00
rustc_baked_icu_data
rustc_borrowck be even more precise about "cast" vs "coercion" 2024-09-24 23:12:02 +02:00
rustc_builtin_macros Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_codegen_cranelift be even more precise about "cast" vs "coercion" 2024-09-24 23:12:02 +02:00
rustc_codegen_gcc Auto merge of #130389 - Luv-Ray:LLVMMDNodeInContext2, r=nikic 2024-09-24 12:07:48 +00:00
rustc_codegen_llvm Auto merge of #130389 - Luv-Ray:LLVMMDNodeInContext2, r=nikic 2024-09-24 12:07:48 +00:00
rustc_codegen_ssa be even more precise about "cast" vs "coercion" 2024-09-24 23:12:02 +02:00
rustc_const_eval be even more precise about "cast" vs "coercion" 2024-09-24 23:12:02 +02:00
rustc_data_structures Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_driver
rustc_driver_impl Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_error_codes mark `E0775` as no longer emitte by the compiler 2024-09-21 13:09:09 +02:00
rustc_error_messages Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_errors Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_expand Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_feature add unqualified_local_imports lint 2024-09-23 11:57:28 +02:00
rustc_fluent_macro Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_fs_util Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_graphviz Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_hir Rollup merge of #130714 - compiler-errors:try-structurally-resolve-const, r=BoxyUwU 2024-09-23 06:45:36 +02:00
rustc_hir_analysis Separate collection of crate-local inherent impls from error reporting 2024-09-24 10:12:05 -04:00
rustc_hir_pretty Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_hir_typeck Rollup merge of #130764 - compiler-errors:inherent, r=estebank 2024-09-24 19:47:50 -04:00
rustc_incremental Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_index Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_index_macros
rustc_infer Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_interface Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_lexer Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_lint Auto merge of #130768 - compiler-errors:rollup-8ncjy55, r=compiler-errors 2024-09-24 06:02:43 +00:00
rustc_lint_defs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_llvm Auto merge of #130446 - durin42:llvm-20-fix-CommandLineArgs, r=workingjubilee 2024-09-22 05:26:41 +00:00
rustc_log Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_macros Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_metadata Separate collection of crate-local inherent impls from error reporting 2024-09-24 10:12:05 -04:00
rustc_middle Rollup merge of #130764 - compiler-errors:inherent, r=estebank 2024-09-24 19:47:50 -04:00
rustc_mir_build be even more precise about "cast" vs "coercion" 2024-09-24 23:12:02 +02:00
rustc_mir_dataflow Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_mir_transform be even more precise about "cast" vs "coercion" 2024-09-24 23:12:02 +02:00
rustc_monomorphize Rollup merge of #130764 - compiler-errors:inherent, r=estebank 2024-09-24 19:47:50 -04:00
rustc_next_trait_solver Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_parse Rollup merge of #130551 - nnethercote:fix-break-last-token, r=petrochenkov 2024-09-23 07:54:44 -07:00
rustc_parse_format Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_passes Check vtable projections for validity in miri 2024-09-23 19:38:26 -04:00
rustc_pattern_analysis Rollup merge of #130715 - compiler-errors:mir-build-const-eval, r=BoxyUwU 2024-09-23 06:45:36 +02:00
rustc_privacy Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_query_impl Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_query_system Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_resolve Separate collection of crate-local inherent impls from error reporting 2024-09-24 10:12:05 -04:00
rustc_sanitizers Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_serialize Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_session Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_smir be even more precise about "cast" vs "coercion" 2024-09-24 23:12:02 +02:00
rustc_span add unqualified_local_imports lint 2024-09-23 11:57:28 +02:00
rustc_symbol_mangling Rollup merge of #130344 - Jaic1:fix-116306, r=BoxyUwU 2024-09-23 06:45:33 +02:00
rustc_target Rollup merge of #130750 - heiher:loong-linux-ohos-tier3, r=jieyouxu 2024-09-23 23:49:12 -04:00
rustc_trait_selection Rollup merge of #130714 - compiler-errors:try-structurally-resolve-const, r=BoxyUwU 2024-09-23 06:45:36 +02:00
rustc_traits Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_transmute Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_ty_utils Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_type_ir Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_type_ir_macros Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
stable_mir unify dyn* coercions with other pointer coercions 2024-09-24 22:17:55 +02:00