Skip to content

cargo doc failed for clap version 3.2.22 #108658

Closed
@krotd

Description

@krotd

Code

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

[dependencies]
clap = "3.2.22"

Meta

rustc --version --verbose:

rustc 1.69.0-nightly (f77bfb733 2023-03-01)
binary: rustc
commit-hash: f77bfb7336f21bfe6a5fb5f7358d4406e2597289
commit-date: 2023-03-01
host: x86_64-unknown-linux-gnu
release: 1.69.0-nightly
LLVM version: 15.0.7

Error output

thread 'rustc' panicked at 'no resolution for "ValueEnum" MacroNS DefId(0:52 ~ clap[e05b]::derive)', src/librustdoc/passes/collect_intra_doc_links.rs:391:32
stack backtrace:
   0:     0x7f6f56766afa - std::backtrace_rs::backtrace::libunwind::trace::h34498aba16c27c5d
                               at /rustc/f77bfb7336f21bfe6a5fb5f7358d4406e2597289/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f6f56766afa - std::backtrace_rs::backtrace::trace_unsynchronized::h9289a4d08e8f8065
                               at /rustc/f77bfb7336f21bfe6a5fb5f7358d4406e2597289/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f6f56766afa - std::sys_common::backtrace::_print_fmt::hdc48108f3bcc17d7
                               at /rustc/f77bfb7336f21bfe6a5fb5f7358d4406e2597289/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f6f56766afa - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h0e26d08b27a6dd1d
                               at /rustc/f77bfb7336f21bfe6a5fb5f7358d4406e2597289/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f6f567ca27e - core::fmt::write::h72fef7731620cf25
                               at /rustc/f77bfb7336f21bfe6a5fb5f7358d4406e2597289/library/core/src/fmt/mod.rs:1232:17
   5:     0x7f6f56759a65 - std::io::Write::write_fmt::h2c6467b36a994dc1
                               at /rustc/f77bfb7336f21bfe6a5fb5f7358d4406e2597289/library/std/src/io/mod.rs:1684:15
   6:     0x7f6f567668c5 - std::sys_common::backtrace::_print::h9ed7190f3ab4032b
                               at /rustc/f77bfb7336f21bfe6a5fb5f7358d4406e2597289/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f6f567668c5 - std::sys_common::backtrace::print::h82d15082d5d08ddd
                               at /rustc/f77bfb7336f21bfe6a5fb5f7358d4406e2597289/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f6f5676963f - std::panicking::default_hook::{{closure}}::h8c24b2c3eee8f54e
                               at /rustc/f77bfb7336f21bfe6a5fb5f7358d4406e2597289/library/std/src/panicking.rs:271:22
   9:     0x7f6f5676937b - std::panicking::default_hook::hcd9302e49bce35d9
                               at /rustc/f77bfb7336f21bfe6a5fb5f7358d4406e2597289/library/std/src/panicking.rs:290:9
  10:     0x7f6f599d53f5 - rustc_driver_impl[4d5cb03342eaf40]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f6f56769e7d - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h157f8bd1e3a60b9e
                               at /rustc/f77bfb7336f21bfe6a5fb5f7358d4406e2597289/library/alloc/src/boxed.rs:2001:9
  12:     0x7f6f56769e7d - std::panicking::rust_panic_with_hook::h8dc9549cbbb83c93
                               at /rustc/f77bfb7336f21bfe6a5fb5f7358d4406e2597289/library/std/src/panicking.rs:696:13
  13:     0x7f6f56769bf9 - std::panicking::begin_panic_handler::{{closure}}::h9b0840da0b1a0862
                               at /rustc/f77bfb7336f21bfe6a5fb5f7358d4406e2597289/library/std/src/panicking.rs:583:13
  14:     0x7f6f56766f66 - std::sys_common::backtrace::__rust_end_short_backtrace::h1673dd05d1a0dc8f
                               at /rustc/f77bfb7336f21bfe6a5fb5f7358d4406e2597289/library/std/src/sys_common/backtrace.rs:137:18
  15:     0x7f6f56769902 - rust_begin_unwind
                               at /rustc/f77bfb7336f21bfe6a5fb5f7358d4406e2597289/library/std/src/panicking.rs:579:5
  16:     0x7f6f567c65e3 - core::panicking::panic_fmt::hdf244b8669b920f6
                               at /rustc/f77bfb7336f21bfe6a5fb5f7358d4406e2597289/library/core/src/panicking.rs:64:14
  17:     0x55e68beeebe4 - <rustdoc[439ec2be8d52c9a7]::passes::collect_intra_doc_links::LinkCollector>::resolve_path
  18:     0x55e68beeed0e - <rustdoc[439ec2be8d52c9a7]::passes::collect_intra_doc_links::LinkCollector>::resolve
  19:     0x55e68bef2924 - <rustdoc[439ec2be8d52c9a7]::passes::collect_intra_doc_links::LinkCollector as rustdoc[439ec2be8d52c9a7]::visit::DocVisitor>::visit_item
  20:     0x55e68befbc3a - <rustdoc[439ec2be8d52c9a7]::passes::collect_intra_doc_links::LinkCollector as rustdoc[439ec2be8d52c9a7]::visit::DocVisitor>::visit_inner_recur
  21:     0x55e68bef603c - <rustdoc[439ec2be8d52c9a7]::passes::collect_intra_doc_links::LinkCollector as rustdoc[439ec2be8d52c9a7]::visit::DocVisitor>::visit_item
  22:     0x55e68beed662 - rustdoc[439ec2be8d52c9a7]::passes::collect_intra_doc_links::collect_intra_doc_links
  23:     0x55e68be35a6e - <rustc_session[947bba98393ca4fe]::session::Session>::time::<rustdoc[439ec2be8d52c9a7]::clean::types::Crate, rustdoc[439ec2be8d52c9a7]::core::run_global_ctxt::{closure#7}>
  24:     0x55e68bf61450 - rustdoc[439ec2be8d52c9a7]::core::run_global_ctxt
  25:     0x55e68be35cf9 - <rustc_session[947bba98393ca4fe]::session::Session>::time::<(rustdoc[439ec2be8d52c9a7]::clean::types::Crate, rustdoc[439ec2be8d52c9a7]::config::RenderOptions, rustdoc[439ec2be8d52c9a7]::formats::cache::Cache), rustdoc[439ec2be8d52c9a7]::main_args::{closure#1}::{closure#0}::{closure#0}::{closure#0}>
  26:     0x55e68bd34407 - <rustc_middle[9cf018341417739a]::ty::context::GlobalCtxt>::enter::<rustdoc[439ec2be8d52c9a7]::main_args::{closure#1}::{closure#0}::{closure#0}, core[87ae5becae78eb7d]::result::Result<(), rustc_span[25e4e29a33f2c9a0]::ErrorGuaranteed>>
  27:     0x55e68bd9f67e - rustc_span[25e4e29a33f2c9a0]::with_source_map::<core[87ae5becae78eb7d]::result::Result<(), rustc_span[25e4e29a33f2c9a0]::ErrorGuaranteed>, rustc_interface[7d9b2342fec184f0]::interface::run_compiler<core[87ae5becae78eb7d]::result::Result<(), rustc_span[25e4e29a33f2c9a0]::ErrorGuaranteed>, rustdoc[439ec2be8d52c9a7]::main_args::{closure#1}>::{closure#0}::{closure#0}>
  28:     0x55e68bd11c04 - <scoped_tls[734a196e81d7ad0d]::ScopedKey<rustc_span[25e4e29a33f2c9a0]::SessionGlobals>>::set::<rustc_interface[7d9b2342fec184f0]::interface::run_compiler<core[87ae5becae78eb7d]::result::Result<(), rustc_span[25e4e29a33f2c9a0]::ErrorGuaranteed>, rustdoc[439ec2be8d52c9a7]::main_args::{closure#1}>::{closure#0}, core[87ae5becae78eb7d]::result::Result<(), rustc_span[25e4e29a33f2c9a0]::ErrorGuaranteed>>
  29:     0x55e68be48590 - std[97c6a3d67a80fb6d]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[7d9b2342fec184f0]::util::run_in_thread_pool_with_globals<rustc_interface[7d9b2342fec184f0]::interface::run_compiler<core[87ae5becae78eb7d]::result::Result<(), rustc_span[25e4e29a33f2c9a0]::ErrorGuaranteed>, rustdoc[439ec2be8d52c9a7]::main_args::{closure#1}>::{closure#0}, core[87ae5becae78eb7d]::result::Result<(), rustc_span[25e4e29a33f2c9a0]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[87ae5becae78eb7d]::result::Result<(), rustc_span[25e4e29a33f2c9a0]::ErrorGuaranteed>>
  30:     0x55e68bf1807d - <<std[97c6a3d67a80fb6d]::thread::Builder>::spawn_unchecked_<rustc_interface[7d9b2342fec184f0]::util::run_in_thread_pool_with_globals<rustc_interface[7d9b2342fec184f0]::interface::run_compiler<core[87ae5becae78eb7d]::result::Result<(), rustc_span[25e4e29a33f2c9a0]::ErrorGuaranteed>, rustdoc[439ec2be8d52c9a7]::main_args::{closure#1}>::{closure#0}, core[87ae5becae78eb7d]::result::Result<(), rustc_span[25e4e29a33f2c9a0]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[87ae5becae78eb7d]::result::Result<(), rustc_span[25e4e29a33f2c9a0]::ErrorGuaranteed>>::{closure#1} as core[87ae5becae78eb7d]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  31:     0x7f6f56773cb3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hfea88e05acd13bd2
                               at /rustc/f77bfb7336f21bfe6a5fb5f7358d4406e2597289/library/alloc/src/boxed.rs:1987:9
  32:     0x7f6f56773cb3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h31d26542010403e8
                               at /rustc/f77bfb7336f21bfe6a5fb5f7358d4406e2597289/library/alloc/src/boxed.rs:1987:9
  33:     0x7f6f56773cb3 - std::sys::unix::thread::Thread::new::thread_start::h6a6d49bd896852f8
                               at /rustc/f77bfb7336f21bfe6a5fb5f7358d4406e2597289/library/std/src/sys/unix/thread.rs:108:17
  34:     0x7f6f56494b43 - start_thread
                               at ./nptl/./nptl/pthread_create.c:442:8
  35:     0x7f6f56526a00 - clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  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-nightly (f77bfb733 2023-03-01) 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
error: could not document `clap`

Caused by:
  process didn't exit successfully: `rustdoc --edition=2021 --crate-type lib --crate-name clap /home/dak/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.2.23/src/lib.rs --cap-lints allow -o /tmp/bug_clap_doc/target/doc --cfg 'feature="atty"' --cfg 'feature="color"' --cfg 'feature="default"' --cfg 'feature="std"' --cfg 'feature="strsim"' --cfg 'feature="suggestions"' --cfg 'feature="termcolor"' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=146 -C metadata=6887d842818c485d -L dependency=/tmp/bug_clap_doc/target/debug/deps --extern atty=/tmp/bug_clap_doc/target/debug/deps/libatty-dcb18311058c963e.rmeta --extern bitflags=/tmp/bug_clap_doc/target/debug/deps/libbitflags-f75283d3dcd3daad.rmeta --extern clap_lex=/tmp/bug_clap_doc/target/debug/deps/libclap_lex-6008a919530e6b2d.rmeta --extern indexmap=/tmp/bug_clap_doc/target/debug/deps/libindexmap-97859a7641d7b1fd.rmeta --extern strsim=/tmp/bug_clap_doc/target/debug/deps/libstrsim-95324a042c633895.rmeta --extern termcolor=/tmp/bug_clap_doc/target/debug/deps/libtermcolor-09965599c40afa4c.rmeta --extern textwrap=/tmp/bug_clap_doc/target/debug/deps/libtextwrap-4d9090cd278afea4.rmeta --crate-version 3.2.23` (exit status: 101)
Backtrace

thread 'rustc' panicked at 'no resolution for "ValueEnum" MacroNS DefId(0:52 ~ clap[e05b]::derive)', src/librustdoc/passes/collect_intra_doc_links.rs:391:32
stack backtrace:
   0: rust_begin_unwind
             at /rustc/f77bfb7336f21bfe6a5fb5f7358d4406e2597289/library/std/src/panicking.rs:579:5
   1: core::panicking::panic_fmt
             at /rustc/f77bfb7336f21bfe6a5fb5f7358d4406e2597289/library/core/src/panicking.rs:64:14
   2: <rustdoc::passes::collect_intra_doc_links::LinkCollector>::resolve_path
   3: <rustdoc::passes::collect_intra_doc_links::LinkCollector>::resolve
   4: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::visit::DocVisitor>::visit_item
   5: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::visit::DocVisitor>::visit_inner_recur
   6: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::visit::DocVisitor>::visit_item
   7: rustdoc::passes::collect_intra_doc_links::collect_intra_doc_links
   8: <rustc_session::session::Session>::time::<rustdoc::clean::types::Crate, rustdoc::core::run_global_ctxt::{closure#7}>
   9: rustdoc::core::run_global_ctxt
  10: <rustc_session::session::Session>::time::<(rustdoc::clean::types::Crate, rustdoc::config::RenderOptions, rustdoc::formats::cache::Cache), rustdoc::main_args::{closure#1}::{closure#0}::{closure#0}::{closure#0}>
  11: <rustc_middle::ty::context::GlobalCtxt>::enter::<rustdoc::main_args::{closure#1}::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
  12: rustc_span::with_source_map::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustdoc::main_args::{closure#1}>::{closure#0}::{closure#0}>
  13: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustdoc::main_args::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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-nightly (f77bfb733 2023-03-01) 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
error: could not document `clap`

Caused by:
  process didn't exit successfully: `rustdoc --edition=2021 --crate-type lib --crate-name clap /home/dak/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.2.23/src/lib.rs --cap-lints allow -o /tmp/bug_clap_doc/target/doc --cfg 'feature="atty"' --cfg 'feature="color"' --cfg 'feature="default"' --cfg 'feature="std"' --cfg 'feature="strsim"' --cfg 'feature="suggestions"' --cfg 'feature="termcolor"' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=146 -C metadata=6887d842818c485d -L dependency=/tmp/bug_clap_doc/target/debug/deps --extern atty=/tmp/bug_clap_doc/target/debug/deps/libatty-dcb18311058c963e.rmeta --extern bitflags=/tmp/bug_clap_doc/target/debug/deps/libbitflags-f75283d3dcd3daad.rmeta --extern clap_lex=/tmp/bug_clap_doc/target/debug/deps/libclap_lex-6008a919530e6b2d.rmeta --extern indexmap=/tmp/bug_clap_doc/target/debug/deps/libindexmap-97859a7641d7b1fd.rmeta --extern strsim=/tmp/bug_clap_doc/target/debug/deps/libstrsim-95324a042c633895.rmeta --extern termcolor=/tmp/bug_clap_doc/target/debug/deps/libtermcolor-09965599c40afa4c.rmeta --extern textwrap=/tmp/bug_clap_doc/target/debug/deps/libtextwrap-4d9090cd278afea4.rmeta --crate-version 3.2.23` (exit status: 101)

Metadata

Metadata

Assignees

Labels

C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions