Skip to content
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

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

Closed
lukas-code opened this issue Dec 19, 2022 · 0 comments · Fixed by #105899
Closed

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

lukas-code opened this issue Dec 19, 2022 · 0 comments · Fixed by #105899
Assignees
Labels
C-bug Category: This is a bug.

Comments

@lukas-code
Copy link
Member

lukas-code commented Dec 19, 2022

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

@rustbot rustbot added the C-bug Category: This is a bug. label Dec 19, 2022
@bors bors closed this as completed in 10374d3 Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants