Skip to content

Documenting private items of standard library with stage 1 compiler fails #105898

Closed
@lukas-code

Description

@lukas-code

Running RUSTDOCFLAGS=--document-private-items ./x doc --stage 1 library fails with this error:

 Documenting alloc v0.0.0 (/home/lukas/code/rust/library/alloc)
error[E0080]: evaluation of constant value failed
    --> library/alloc/src/collections/btree/node.rs:1679:38
     |
1679 |         const TRAVERSAL_PERMIT: () = panic!();
     |                                      ^^^^^^^^ the evaluated program panicked at 'explicit panic', library/alloc/src/collections/btree/node.rs:1679:38
     |
     = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0080`.
error: could not document `alloc`

Caused by:
  process didn't exit successfully: `/home/lukas/code/rust/build/bootstrap/debug/rustdoc --edition=2021 --crate-type lib --crate-name alloc library/alloc/src/lib.rs --target x86_64-unknown-linux-gnu -o /home/lukas/code/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/doc/x86_64-unknown-linux-gnu/doc --cfg 'feature="compiler-builtins-c"' -Zunstable-options --check-cfg 'names()' --check-cfg 'values()' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat -Z unstable-options --resource-suffix 1.68.0 --markdown-css rust.css --markdown-no-toc --index-page /home/lukas/code/rust/src/doc/index.md -C metadata=d6cfa37a8de9f6b1 -L dependency=/home/lukas/code/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/doc/x86_64-unknown-linux-gnu/release/deps -L dependency=/home/lukas/code/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/doc/release/deps --extern compiler_builtins=/home/lukas/code/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/doc/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-adcb81061c726f2b.rmeta --extern core=/home/lukas/code/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/doc/x86_64-unknown-linux-gnu/release/deps/libcore-29b0da95ca4e4f3b.rmeta -Csymbol-mangling-version=legacy -Zunstable-options -Zunstable-options '--check-cfg=values(bootstrap)' '--check-cfg=values(stdarch_intel_sde)' '--check-cfg=values(no_fp_fmt_parse)' '--check-cfg=values(no_global_oom_handling)' '--check-cfg=values(no_rc)' '--check-cfg=values(no_sync)' '--check-cfg=values(freebsd12)' '--check-cfg=values(backtrace_in_libstd)' '--check-cfg=values(target_env,"libnx")' '--check-cfg=values(target_os,"watchos")' '--check-cfg=values(target_arch,"asmjs","spirv","nvptx","nvptx64","le32","xtensa")' '--check-cfg=values(dont_compile_me)' '--check-cfg=values(rustix_use_libc)' --document-private-items -Dwarnings '-Wrustdoc::invalid_codeblock_attributes' --crate-version 1.68.0-dev '-Zcrate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/")'` (exit status: 1)

Without --stage 1 it emits the same error, but "passes". Found in #105848, specifically 3223b6c.

Also, not really related, but ./x doc --open library doesn't open anything.

@rustbot label C-bug
@rustbot claim

Metadata

Metadata

Assignees

Labels

C-bugCategory: This is a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions