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

ICE in rustdoc (rustc 1.69.0-beta.8) while documenting clap 3.2.23 #110412

Closed
DusterTheFirst opened this issue Apr 16, 2023 · 4 comments
Closed
Labels
A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@DusterTheFirst
Copy link

DusterTheFirst commented Apr 16, 2023

Code

https://github.com/DusterTheFirst/rustdoc-ice-1.69.0-beta.8

[package]
edition = "2021"
name    = "ice"
version = "0.1.0"

[dependencies]
clap = { version = "3.2.23", default-features = false, features = ["std"] }
fn main() {
    println!("Hello, world!");
}

Meta

rustc --version --verbose:

rustc 1.69.0-beta.8 (f18236dcd 2023-04-13)
binary: rustc
commit-hash: f18236dcd3d8191c91aca0c4ef43e1e27b6bc0dc
commit-date: 2023-04-13
host: x86_64-unknown-linux-gnu
release: 1.69.0-beta.8
LLVM version: 15.0.7

Error output

error: could not document `clap`

Caused by:
  process didn't exit successfully: `rustdoc --edition=2021 --crate-type lib --crate-name clap /home/dusterthefirst/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.2.23/src/lib.rs --cap-lints allow -o /home/dusterthefirst/Documents/gh/rustdoc-ice-1.69.0-beta.8/target/doc --cfg 'feature="std"' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=198 -C metadata=8b8a936178d0f078 -L dependency=/home/dusterthefirst/Documents/gh/rustdoc-ice-1.69.0-beta.8/target/debug/deps --extern bitflags=/home/dusterthefirst/Documents/gh/rustdoc-ice-1.69.0-beta.8/target/debug/deps/libbitflags-885ae3214f28c119.rmeta --extern clap_lex=/home/dusterthefirst/Documents/gh/rustdoc-ice-1.69.0-beta.8/target/debug/deps/libclap_lex-4e35edcf7296aa11.rmeta --extern indexmap=/home/dusterthefirst/Documents/gh/rustdoc-ice-1.69.0-beta.8/target/debug/deps/libindexmap-46f55d128f3ed5c6.rmeta --extern textwrap=/home/dusterthefirst/Documents/gh/rustdoc-ice-1.69.0-beta.8/target/debug/deps/libtextwrap-ab4f89ac553cec84.rmeta --crate-version 3.2.23` (exit status: 101)
Backtrace

thread 'rustc' panicked at 'no resolution for "ValueEnum" MacroNS DefId(0:52 ~ clap[32b1]::derive)', src/librustdoc/passes/collect_intra_doc_links.rs:391:32
stack backtrace:
   0:     0x7fcd82b6731a - std::backtrace_rs::backtrace::libunwind::trace::h3d0c5cd63d7b29e7
                               at /rustc/f18236dcd3d8191c91aca0c4ef43e1e27b6bc0dc/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7fcd82b6731a - std::backtrace_rs::backtrace::trace_unsynchronized::hf040c9fd7fa6e241
                               at /rustc/f18236dcd3d8191c91aca0c4ef43e1e27b6bc0dc/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fcd82b6731a - std::sys_common::backtrace::_print_fmt::h0bd8ca6c6db457bb
                               at /rustc/f18236dcd3d8191c91aca0c4ef43e1e27b6bc0dc/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7fcd82b6731a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hbe4ab2dd3664b49c
                               at /rustc/f18236dcd3d8191c91aca0c4ef43e1e27b6bc0dc/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7fcd82bcab6e - core::fmt::write::h9b1c2b91dba3c2b9
                               at /rustc/f18236dcd3d8191c91aca0c4ef43e1e27b6bc0dc/library/core/src/fmt/mod.rs:1232:17
   5:     0x7fcd82b5a1c5 - std::io::Write::write_fmt::h67bf413b2fa5171a
                               at /rustc/f18236dcd3d8191c91aca0c4ef43e1e27b6bc0dc/library/std/src/io/mod.rs:1684:15
   6:     0x7fcd82b670e5 - std::sys_common::backtrace::_print::h5f364c7aca928cf2
                               at /rustc/f18236dcd3d8191c91aca0c4ef43e1e27b6bc0dc/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7fcd82b670e5 - std::sys_common::backtrace::print::hbc0f79a89c27b179
                               at /rustc/f18236dcd3d8191c91aca0c4ef43e1e27b6bc0dc/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7fcd82b69e5f - std::panicking::default_hook::{{closure}}::h1be716ed4f96d212
                               at /rustc/f18236dcd3d8191c91aca0c4ef43e1e27b6bc0dc/library/std/src/panicking.rs:271:22
   9:     0x7fcd82b69b9b - std::panicking::default_hook::h88498729070ec00f
                               at /rustc/f18236dcd3d8191c91aca0c4ef43e1e27b6bc0dc/library/std/src/panicking.rs:290:9
  10:     0x7fcd85dd58d5 - rustc_driver_impl[1dc7b3ecda0093f4]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7fcd82b6a69d - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hdaca492497edb6ab
                               at /rustc/f18236dcd3d8191c91aca0c4ef43e1e27b6bc0dc/library/alloc/src/boxed.rs:2001:9
  12:     0x7fcd82b6a69d - std::panicking::rust_panic_with_hook::h0504d9fb8e855097
                               at /rustc/f18236dcd3d8191c91aca0c4ef43e1e27b6bc0dc/library/std/src/panicking.rs:696:13
  13:     0x7fcd82b6a419 - std::panicking::begin_panic_handler::{{closure}}::h47fa384508d17291
                               at /rustc/f18236dcd3d8191c91aca0c4ef43e1e27b6bc0dc/library/std/src/panicking.rs:583:13
  14:     0x7fcd82b67786 - std::sys_common::backtrace::__rust_end_short_backtrace::h2f6eb0dfbb20c193
                               at /rustc/f18236dcd3d8191c91aca0c4ef43e1e27b6bc0dc/library/std/src/sys_common/backtrace.rs:150:18
  15:     0x7fcd82b6a122 - rust_begin_unwind
                               at /rustc/f18236dcd3d8191c91aca0c4ef43e1e27b6bc0dc/library/std/src/panicking.rs:579:5
  16:     0x7fcd82bc6ec3 - core::panicking::panic_fmt::h14563764c064faa0
                               at /rustc/f18236dcd3d8191c91aca0c4ef43e1e27b6bc0dc/library/core/src/panicking.rs:64:14
  17:     0x55d76d5b01f4 - <rustdoc[5d8af1dd11e69b4b]::passes::collect_intra_doc_links::LinkCollector>::resolve_path
  18:     0x55d76d5b031e - <rustdoc[5d8af1dd11e69b4b]::passes::collect_intra_doc_links::LinkCollector>::resolve
  19:     0x55d76d5b3f34 - <rustdoc[5d8af1dd11e69b4b]::passes::collect_intra_doc_links::LinkCollector as rustdoc[5d8af1dd11e69b4b]::visit::DocVisitor>::visit_item
  20:     0x55d76d5bd24a - <rustdoc[5d8af1dd11e69b4b]::passes::collect_intra_doc_links::LinkCollector as rustdoc[5d8af1dd11e69b4b]::visit::DocVisitor>::visit_inner_recur
  21:     0x55d76d5b764c - <rustdoc[5d8af1dd11e69b4b]::passes::collect_intra_doc_links::LinkCollector as rustdoc[5d8af1dd11e69b4b]::visit::DocVisitor>::visit_item
  22:     0x55d76d5aec72 - rustdoc[5d8af1dd11e69b4b]::passes::collect_intra_doc_links::collect_intra_doc_links
  23:     0x55d76d4f6cfe - <rustc_session[913b756757ae5138]::session::Session>::time::<rustdoc[5d8af1dd11e69b4b]::clean::types::Crate, rustdoc[5d8af1dd11e69b4b]::core::run_global_ctxt::{closure#7}>
  24:     0x55d76d622bb0 - rustdoc[5d8af1dd11e69b4b]::core::run_global_ctxt
  25:     0x55d76d4f6f89 - <rustc_session[913b756757ae5138]::session::Session>::time::<(rustdoc[5d8af1dd11e69b4b]::clean::types::Crate, rustdoc[5d8af1dd11e69b4b]::config::RenderOptions, rustdoc[5d8af1dd11e69b4b]::formats::cache::Cache), rustdoc[5d8af1dd11e69b4b]::main_args::{closure#1}::{closure#0}::{closure#0}::{closure#0}>
  26:     0x55d76d3f5df7 - <rustc_middle[c7965b978ca8699b]::ty::context::GlobalCtxt>::enter::<rustdoc[5d8af1dd11e69b4b]::main_args::{closure#1}::{closure#0}::{closure#0}, core[79b88f2e9a30721d]::result::Result<(), rustc_span[55605d320900d82]::ErrorGuaranteed>>
  27:     0x55d76d460d7e - rustc_span[55605d320900d82]::with_source_map::<core[79b88f2e9a30721d]::result::Result<(), rustc_span[55605d320900d82]::ErrorGuaranteed>, rustc_interface[1e4cfad506ea4ac6]::interface::run_compiler<core[79b88f2e9a30721d]::result::Result<(), rustc_span[55605d320900d82]::ErrorGuaranteed>, rustdoc[5d8af1dd11e69b4b]::main_args::{closure#1}>::{closure#0}::{closure#0}>
  28:     0x55d76d3d36a4 - <scoped_tls[df58902d4673eaac]::ScopedKey<rustc_span[55605d320900d82]::SessionGlobals>>::set::<rustc_interface[1e4cfad506ea4ac6]::interface::run_compiler<core[79b88f2e9a30721d]::result::Result<(), rustc_span[55605d320900d82]::ErrorGuaranteed>, rustdoc[5d8af1dd11e69b4b]::main_args::{closure#1}>::{closure#0}, core[79b88f2e9a30721d]::result::Result<(), rustc_span[55605d320900d82]::ErrorGuaranteed>>
  29:     0x55d76d5099d0 - std[2ea116cc324090a6]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[1e4cfad506ea4ac6]::util::run_in_thread_pool_with_globals<rustc_interface[1e4cfad506ea4ac6]::interface::run_compiler<core[79b88f2e9a30721d]::result::Result<(), rustc_span[55605d320900d82]::ErrorGuaranteed>, rustdoc[5d8af1dd11e69b4b]::main_args::{closure#1}>::{closure#0}, core[79b88f2e9a30721d]::result::Result<(), rustc_span[55605d320900d82]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[79b88f2e9a30721d]::result::Result<(), rustc_span[55605d320900d82]::ErrorGuaranteed>>
  30:     0x55d76d5d96bd - <<std[2ea116cc324090a6]::thread::Builder>::spawn_unchecked_<rustc_interface[1e4cfad506ea4ac6]::util::run_in_thread_pool_with_globals<rustc_interface[1e4cfad506ea4ac6]::interface::run_compiler<core[79b88f2e9a30721d]::result::Result<(), rustc_span[55605d320900d82]::ErrorGuaranteed>, rustdoc[5d8af1dd11e69b4b]::main_args::{closure#1}>::{closure#0}, core[79b88f2e9a30721d]::result::Result<(), rustc_span[55605d320900d82]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[79b88f2e9a30721d]::result::Result<(), rustc_span[55605d320900d82]::ErrorGuaranteed>>::{closure#1} as core[79b88f2e9a30721d]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  31:     0x7fcd82b74593 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc688aa2de4e9ad76
                               at /rustc/f18236dcd3d8191c91aca0c4ef43e1e27b6bc0dc/library/alloc/src/boxed.rs:1987:9
  32:     0x7fcd82b74593 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h3d9c34a238798123
                               at /rustc/f18236dcd3d8191c91aca0c4ef43e1e27b6bc0dc/library/alloc/src/boxed.rs:1987:9
  33:     0x7fcd82b74593 - std::sys::unix::thread::Thread::new::thread_start::h2fc9d5948649e753
                               at /rustc/f18236dcd3d8191c91aca0c4ef43e1e27b6bc0dc/library/std/src/sys/unix/thread.rs:108:17
  34:     0x7fcd8290a12d - start_thread
  35:     0x7fcd8298bbc0 - clone3
  36:                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-compiler&template=ice.md

note: rustc 1.69.0-beta.8 (f18236dcd 2023-04-13) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib

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

query stack during panic:
end of query stack

@DusterTheFirst DusterTheFirst added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 16, 2023
@DusterTheFirst DusterTheFirst changed the title ICE in rustdoc (rustc 1.69.0-beta.8) ICE in rustdoc (rustc 1.69.0-beta.8) while documenting clap 3.2.23 Apr 16, 2023
@GuillaumeGomez GuillaumeGomez added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name labels Apr 16, 2023
@kadiwa4
Copy link
Contributor

kadiwa4 commented Apr 16, 2023

regressed in 1.69.0-nightly (585f3eef2 2023-02-11), probably #94857 or maybe #107912

@kadiwa4
Copy link
Contributor

kadiwa4 commented Apr 16, 2023

@rustbot label: +regression-from-stable-to-beta

@rustbot rustbot added regression-from-stable-to-beta Performance or correctness regression from stable to beta. I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Apr 16, 2023
@GuillaumeGomez GuillaumeGomez added the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label Apr 18, 2023
@GuillaumeGomez
Copy link
Member

I just tested with rustdoc 1.70.0-nightly (511364e78 2023-03-16) and it works as expected so I suppose it was fixed by the mentioned PRs.

@apiraino apiraino removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Apr 19, 2023
@apiraino
Copy link
Contributor

I think duplicate of #108658, so probably ok to close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants