← Back to Pull requests

Distinguish experimental/internal features in rustdoc #163488

Open
clarfonthey opened this pull request with 41 lines diff across 3 files
View on GitHub
clarfonthey clarfonthey commented on Sep 29, 2026 14:38 UTC
Author
Diff: 41 lines (+36 / -5) across 3 files Reviewer: GuillaumeGomez Review duration: 90062m
All Vouch review confidence checks passed
Residual risk 0.04 = Change Risk (0.35) × (1 − Review Confidence (0.89)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.35 · 41 lines diff across 3 files
0.35
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.93 · 5 substantive comment(s)
0.93
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
88%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.224
Real PR Conversation Timeline
7 items
GuillaumeGomez GuillaumeGomez commented on code on Sep 29, 2026 14:45 UTC
Code Review
src/librustdoc/html/templates/short_item_info.html:1
@@ -18,6 +18,15 @@
                 ) {# #}
             </span> {# #}
         </div>
+    {% when Self::Internal { feature } %}
+        <div class="stab internal"> {# #}
+            <span class="emoji">⚠️</span> {# #}
+            <span> {# #}
+                This is an internal API and should not be used. ({# #}
+                <code>{{feature}}</code>

Missing {# #} at the end of this line.

View changes since the review

rust-log-analyzer rust-log-analyzer commented on Sep 29, 2026 14:45 UTC
Contributor

The job test-pr-check-2 failed! Check out the build log: (web) (plain enhanced) (plain)

<details><summary><i>Click to see the possible cause of the failure (guessed by this bot)</i></summary>

[RUSTC-TIMING] askama test:false 0.184
error[E0609]: no field `feature` on type `std::option::Option<rustc_attr_ir::Stability>`
   --> src/librustdoc/html/render/print_item.rs:547:26
    |
547 |             if stability.feature.is_internal() {
    |                          ^^^^^^^ unknown field
    |
help: one of the expressions' fields has a field of the same name
    |
547 |             if stability.unwrap().feature.is_internal() {
    |                          +++++++++

error[E0599]: no method named `is_internal` found for struct `rustc_span::Symbol` in the current scope
   --> src/librustdoc/html/render/mod.rs:943:20
    |

</details>

rust-log-analyzer rust-log-analyzer commented on Sep 29, 2026 15:29 UTC
Contributor

The job test-aarch64-gnu-llvm-21-2 failed! Check out the build log: (web) (plain enhanced) (plain)

<details><summary><i>Click to see the possible cause of the failure (guessed by this bot)</i></summary>

   9:     0xff09bc62f688 - std[33d81fd7b491725b]::panicking::default_hook::{closure#0}
                               at /rustc/cbae9b4cae2b108f6a3d18cfe6075714bb739463/library/std/src/panicking.rs:292:27
  10:     0xff09bc650d64 - std[33d81fd7b491725b]::panicking::default_hook
                               at /rustc/cbae9b4cae2b108f6a3d18cfe6075714bb739463/library/std/src/panicking.rs:319:9
  11:     0xff09b8a6f3cc - std[33d81fd7b491725b]::panicking::update_hook::<alloc[67080d3c6b14e77e]::boxed::Box<rustc_driver_impl[f922187a4ba869a2]::install_ice_hook::{closure#1}>>::{closure#0}
  12:     0xff09bc6510e8 - <alloc[67080d3c6b14e77e]::boxed::Box<dyn for<'a, 'b> core[294a906010cf8332]::ops::function::Fn<(&'a std[33d81fd7b491725b]::panic::PanicHookInfo<'b>,), Output = ()> + core[294a906010cf8332]::marker::Send + core[294a906010cf8332]::marker::Sync> as core[294a906010cf8332]::ops::function::Fn<(&std[33d81fd7b491725b]::panic::PanicHookInfo,)>>::call
                               at /rustc/cbae9b4cae2b108f6a3d18cfe6075714bb739463/library/alloc/src/boxed.rs:2334:9
  13:     0xff09bc6510e8 - std[33d81fd7b491725b]::panicking::panic_with_hook
                               at /rustc/cbae9b4cae2b108f6a3d18cfe6075714bb739463/library/std/src/panicking.rs:823:13
  14:     0xff09bc62f720 - std[33d81fd7b491725b]::panicking::panic_handler::{closure#0}
                               at /rustc/cbae9b4cae2b108f6a3d18cfe6075714bb739463/library/std/src/panicking.rs:688:13
  15:     0xff09bc627648 - std[33d81fd7b491725b]::sys::backtrace::__rust_end_short_backtrace::<std[33d81fd7b491725b]::panicking::panic_handler::{closure#0}, !>
                               at /rustc/cbae9b4cae2b108f6a3d18cfe6075714bb739463/library/std/src/sys/backtrace.rs:182:18
  16:     0xff09bc63103c - __rustc[84be79524b836da9]::rust_begin_unwind
                               at /rustc/cbae9b4cae2b108f6a3d18cfe6075714bb739463/library/std/src/panicking.rs:679:5
  17:     0xff09b89bdbc4 - core[294a906010cf8332]::panicking::panic_fmt
                               at /rustc/cbae9b4cae2b108f6a3d18cfe6075714bb739463/library/core/src/panicking.rs:80:14
  18:     0xff09bc0a62f0 - <rustc_feature[75f875b65ae2cc62]::unstable::Features>::internal
  19:     0xaac7140b038c - rustdoc[88725f767812ff68]::html::render::document_item_info
  20:     0xaac71408608c - rustdoc[88725f767812ff68]::html::render::render_impl::{closure#0}::doc_impl_item::<&mut alloc[67080d3c6b14e77e]::string::String, &mut alloc[67080d3c6b14e77e]::string::String>
  21:     0xaac713e929ec - rustdoc[88725f767812ff68]::html::render::render_impl::{closure#0}
  22:     0xaac713e9ef10 - <&mut <rustdoc[88725f767812ff68]::html::render::write_shared::Part<rustdoc[88725f767812ff68]::html::render::write_shared::TypeAlias, rustdoc[88725f767812ff68]::html::render::ordered_json::OrderedJson>>::get::{closure#0} as core[294a906010cf8332]::ops::function::FnMut<(&rustdoc[88725f767812ff68]::html::render::write_shared::AliasedTypeImpl,)>>::call_mut
  23:     0xaac713e02700 - <alloc[67080d3c6b14e77e]::vec::Vec<rustdoc[88725f767812ff68]::html::render::ordered_json::OrderedJson> as alloc[67080d3c6b14e77e]::vec::spec_from_iter::SpecFromIter<rustdoc[88725f767812ff68]::html::render::ordered_json::OrderedJson, core[294a906010cf8332]::iter::adapters::map::Map<core[294a906010cf8332]::iter::adapters::filter_map::FilterMap<indexmap[deddf1492d0a77ab]::map::iter::Values<rustdoc[88725f767812ff68]::clean::types::ItemId, rustdoc[88725f767812ff68]::html::render::write_shared::AliasedTypeImpl>, <rustdoc[88725f767812ff68]::html::render::write_shared::Part<rustdoc[88725f767812ff68]::html::render::write_shared::TypeAlias, rustdoc[88725f767812ff68]::html::render::ordered_json::OrderedJson>>::get::{closure#0}>, <rustdoc[88725f767812ff68]::html::render::write_shared::Part<rustdoc[88725f767812ff68]::html::render::write_shared::TypeAlias, rustdoc[88725f767812ff68]::html::render::ordered_json::OrderedJson>>::get::{closure#1}>>>::from_iter
  24:     0xaac71417241c - <core[294a906010cf8332]::iter::adapters::map::Map<core[294a906010cf8332]::iter::adapters::filter_map::FilterMap<indexmap[deddf1492d0a77ab]::map::iter::Values<rustdoc[88725f767812ff68]::clean::types::ItemId, rustdoc[88725f767812ff68]::html::render::write_shared::AliasedTypeImpl>, <rustdoc[88725f767812ff68]::html::render::write_shared::Part<rustdoc[88725f767812ff68]::html::render::write_shared::TypeAlias, rustdoc[88725f767812ff68]::html::render::ordered_json::OrderedJson>>::get::{closure#0}>, <rustdoc[88725f767812ff68]::html::render::write_shared::Part<rustdoc[88725f767812ff68]::html::render::write_shared::TypeAlias, rustdoc[88725f767812ff68]::html::render::ordered_json::OrderedJson>>::get::{closure#1}> as itertools[1c9c2d5db0c81946]::Itertools>::sorted_unstable_by::<<rustdoc[88725f767812ff68]::html::render::ordered_json::OrderedJson>::array_sorted<rustdoc[88725f767812ff68]::html::render::ordered_json::OrderedJson, core[294a906010cf8332]::iter::adapters::map::Map<core[294a906010cf8332]::iter::adapters::filter_map::FilterMap<indexmap[deddf1492d0a77ab]::map::iter::Values<rustdoc[88725f767812ff68]::clean::types::ItemId, rustdoc[88725f767812ff68]::html::render::write_shared::AliasedTypeImpl>, <rustdoc[88725f767812ff68]::html::render::write_shared::Part<rustdoc[88725f767812ff68]::html::render::write_shared::TypeAlias, rustdoc[88725f767812ff68]::html::render::ordered_json::OrderedJson>>::get::{closure#0}>, <rustdoc[88725f767812ff68]::html::render::write_shared::Part<rustdoc[88725f767812ff68]::html::render::write_shared::TypeAlias, rustdoc[88725f767812ff68]::html::render::ordered_json::OrderedJson>>::get::{closure#1}>>::{closure#0}>
  25:     0xaac7140cede0 - <rustdoc[88725f767812ff68]::html::render::ordered_json::OrderedJson>::array_sorted::<rustdoc[88725f767812ff68]::html::render::ordered_json::OrderedJson, core[294a906010cf8332]::iter::adapters::map::Map<core[294a906010cf8332]::iter::adapters::filter_map::FilterMap<indexmap[deddf1492d0a77ab]::map::iter::Values<rustdoc[88725f767812ff68]::clean::types::ItemId, rustdoc[88725f767812ff68]::html::render::write_shared::AliasedTypeImpl>, <rustdoc[88725f767812ff68]::html::render::write_shared::Part<rustdoc[88725f767812ff68]::html::render::write_shared::TypeAlias, rustdoc[88725f767812ff68]::html::render::ordered_json::OrderedJson>>::get::{closure#0}>, <rustdoc[88725f767812ff68]::html::render::write_shared::Part<rustdoc[88725f767812ff68]::html::render::write_shared::TypeAlias, rustdoc[88725f767812ff68]::html::render::ordered_json::OrderedJson>>::get::{closure#1}>>
  26:     0xaac713e94b18 - <rustdoc[88725f767812ff68]::html::render::write_shared::Part<rustdoc[88725f767812ff68]::html::render::write_shared::TypeAlias, rustdoc[88725f767812ff68]::html::render::ordered_json::OrderedJson>>::get
  27:     0xaac713e98f78 - rustdoc[88725f767812ff68]::html::render::write_shared::write_shared
  28:     0xaac713ee18e4 - <rustdoc[88725f767812ff68]::html::render::context::Context>::init
  29:     0xaac713ed2204 - rustdoc[88725f767812ff68]::formats::renderer::run_format::<rustdoc[88725f767812ff68]::html::render::context::Context, rustdoc[88725f767812ff68]::main_args::{closure#2}::{closure#0}::{closure#1}::{closure#0}>
  30:     0xaac713d8fae8 - rustdoc[88725f767812ff68]::run_renderer::<rustdoc[88725f767812ff68]::html::render::context::Context, rustdoc[88725f767812ff68]::main_args::{closure#2}::{closure#0}::{closure#1}::{closure#0}>
  31:     0xaac713eb65a4 - <rustc_session[cc75fdae8dbb80d4]::session::Session>::time::<(), rustdoc[88725f767812ff68]::main_args::{closure#2}::{closure#0}::{closure#1}>
  32:     0xaac713fe879c - <std[33d81fd7b491725b]::thread::local::LocalKey<core[294a906010cf8332]::cell::Cell<*const ()>>>::with::<rustc_middle[24a0a78bcf5f6107]::ty::context::tls::enter_context<<rustc_middle[24a0a78bcf5f6107]::ty::context::GlobalCtxt>::enter<rustc_interface[8304c149511554fd]::passes::create_and_enter_global_ctxt<(), rustdoc[88725f767812ff68]::main_args::{closure#2}::{closure#0}>::{closure#2}, ()>::{closure#1}, ()>::{closure#0}, ()>
  33:     0xaac713f5a33c - rustc_interface[8304c149511554fd]::passes::create_and_enter_global_ctxt::<(), rustdoc[88725f767812ff68]::main_args::{closure#2}::{closure#0}>
  34:     0xaac714018828 - rustc_interface[8304c149511554fd]::interface::run_compiler::<(), rustdoc[88725f767812ff68]::main_args::{closure#2}>::{closure#2}
  35:     0xaac713ffe724 - std[33d81fd7b491725b]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[8304c149511554fd]::util::run_in_thread_with_globals<rustc_interface[8304c149511554fd]::util::run_in_thread_pool_with_globals<rustc_interface[8304c149511554fd]::interface::run_compiler<(), rustdoc[88725f767812ff68]::main_args::{closure#2}>::{closure#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  36:     0xaac71401a594 - <std[33d81fd7b491725b]::thread::lifecycle::spawn_unchecked<rustc_interface[8304c149511554fd]::util::run_in_thread_with_globals<rustc_interface[8304c149511554fd]::util::run_in_thread_pool_with_globals<rustc_interface[8304c149511554fd]::interface::run_compiler<(), rustdoc[88725f767812ff68]::main_args::{closure#2}>::{closure#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[294a906010cf8332]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  37:     0xff09bc65bcb0 - <alloc[67080d3c6b14e77e]::boxed::Box<dyn core[294a906010cf8332]::ops::function::FnOnce<(), Output = ()> + core[294a906010cf8332]::marker::Send> as core[294a906010cf8332]::ops::function::FnOnce<()>>::call_once
                               at /rustc/cbae9b4cae2b108f6a3d18cfe6075714bb739463/library/alloc/src/boxed.rs:2320:9
  38:     0xff09bc65bcb0 - <std[33d81fd7b491725b]::sys::thread::unix::Thread>::new::thread_start
                               at /rustc/cbae9b4cae2b108f6a3d18cfe6075714bb739463/library/std/src/sys/thread/unix.rs:123:17
  39:     0xff09b7d0b9f4 - <unknown>
  40:     0xff09b7d7700c - <unknown>
  41:                0x0 - <unknown>

error: the compiler unexpectedly panicked. This is a bug

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-rustdoc&template=ice.md

note: please make sure that you have updated to the latest nightly

warning: the ICE couldn't be written to `/checkout/rustc-ice-2026-09-29T15_28_27-54987.txt`: Read-only file system (os error 30)

note: rustc 1.101.0-nightly (39c04bf9d 2026-09-29) running on aarch64-unknown-linux-gnu

note: compiler flags: --crate-type lib -Z annotate-moves -Z randomize-layout -Z unstable-options -Z crate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/") -Z crate-attr=warn(rust_2018_idioms) -Z unstable-options -Z force-unstable-if-unmarked

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: could not document `core`
warning: build failed, waiting for other jobs to finish...
[RUSTC-TIMING] core test:false 32.066
Bootstrap failed while executing `--stage 2 test --skip tidy --skip intrinsic-test --skip src/tools/rust-analyzer --skip tests --skip library --skip tidyselftest`
Currently active steps:
test::Linkcheck { host: aarch64-unknown-linux-gnu } at src/bootstrap/src/core/build_steps/test.rs:161
doc::Std { build_compiler: Compiler { stage: 1, host: aarch64-unknown-linux-gnu, forced_compiler: false }, target: aarch64-unknown-linux-gnu, format: Html, crates: ["alloc", "compiler_builtins", "core", "panic_abort", "panic_unwind", "proc_macro", "rustc-std-workspace-core", "std", "std_detect", "sysroot", "test", "unwind"] } at src/bootstrap/src/core/build_steps/doc.rs:664
Command `/checkout/obj/build/aarch64-unknown-linux-gnu/stage0/bin/cargo doc --target aarch64-unknown-linux-gnu -Zbinary-dep-depinfo -j 4 -Zroot-dir=/checkout -Zembed-metadata=no --locked --color=always --profile=dist -p alloc -p compiler_builtins -p core -p panic_abort -p panic_unwind -p proc_macro -p rustc-std-workspace-core -p std -p std_detect -p sysroot -p test -p unwind --features 'backtrace panic-unwind compiler-builtins-c' --manifest-path /checkout/library/sysroot/Cargo.toml --no-deps --target-dir /checkout/obj/build/aarch64-unknown-linux-gnu/stage1-std/aarch64-unknown-linux-gnu/doc -Zskip-rustdoc-fingerprint -Zrustdoc-map [workdir=/checkout]` failed with exit code 101
Created at: src/bootstrap/src/core/build_steps/doc.rs:829:21
Executed at: src/bootstrap/src/core/build_steps/doc.rs:760:30

Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:32:58
  local time: Tue Sep 29 15:28:39 UTC 2026
  network time: Tue, 29 Sep 2026 15:28:40 GMT
##[error]Process completed with exit code 1.
##[group]Run echo "disk usage:"

</details>

rust-log-analyzer rust-log-analyzer commented on Sep 30, 2026 16:02 UTC
Contributor

The job test-pr-check-2 failed! Check out the build log: (web) (plain enhanced) (plain)

<details><summary><i>Click to see the possible cause of the failure (guessed by this bot)</i></summary>

[RUSTC-TIMING] askama test:false 0.113
error[E0609]: no field `span` on type `&rustc_attr_ir::Stability`
   --> src/librustdoc/html/render/mod.rs:936:39
    |
936 |         .map(|stab| (stab.level, stab.span, stab.feature))
    |                                       ^^^^ unknown field
    |
    = note: available fields are: `level`, `feature`

For more information about this error, try `rustc --explain E0609`.

</details>

yilin0518 yilin0518 commented on Oct 24, 2026 02:38 UTC
Contributor

@clarfonthey I notice that the PR failed. I'm interested in helping with this PR and fix the CI failure. Could I help with this fix? I can send a fix to your branch, or continue the work in a new follow-up PR if you prefer.

rust-bors[bot] rust-bors[bot] commented on Nov 25, 2026 01:49 UTC
Bot

:umbrella: The latest upstream changes (presumably #166532) made this pull request unmergeable. Please resolve the merge conflicts by rebasing.

Assignees
clarfonthey clarfonthey
Labels
risk: low confidence: 88.8% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 35.3% (MEDIUM) · Higher = larger blast radius
35.3%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 88.8% · Lower = rushed or shallow review
88.8%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 4.0% · Safe to merge
4.0%
Repository