Skip to content

ICE with rustdoc at collect_intra_doc_links.rs: panicked at 'no resolution for "num_integer" MacroNS' #114290

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

Closed
maurges opened this issue Jul 31, 2023 · 4 comments
Labels
A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@maurges
Copy link

maurges commented Jul 31, 2023

Code

Caused by trying to document curv-kzen crate. Older version of the crate (I also use 0.2.7) doesn't panic. Neither did it panic with rustc version 1.69.

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

[dependencies]
curv-v09 = { package = "curv-kzen", version = "0.9" }

The crate code itself doesn't matter, here's my main.rs

fn main() {}

Meta

rustc --version --verbose:

rustc 1.71.0 (8ede3aae2 2023-07-12)
binary: rustc
commit-hash: 8ede3aae28fe6e4d52b38157d7bfe0d3bceef225
commit-date: 2023-07-12
host: aarch64-apple-darwin
release: 1.71.0
LLVM version: 16.0.5

Error output

> RUST_BACKTRACE=full cargo doc
 Documenting curv-kzen v0.9.0
thread 'rustc' panicked at 'no resolution for "num_integer" MacroNS DefId(0:1210 ~ curv[89db]::arithmetic::traits)', src/librustdoc/passes/collect_intra_doc_links.rs:401:32
stack backtrace:
   0:        0x10194ace0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h3fbf720fbb1cb41b
   1:        0x101999a84 - core::fmt::write::h8ab6230d6f2a4204
   2:        0x101940dbc - std::io::Write::write_fmt::h15ecdca1916a179e
   3:        0x10194ab34 - std::sys_common::backtrace::print::hb6e94bab886a9ccf
   4:        0x10194d598 - std::panicking::default_hook::{{closure}}::h4a0e30e90cb1c7bb
   5:        0x10194d3a0 - std::panicking::default_hook::h0bb5bbf65ac7c64d
   6:        0x109e0699c - rustc_driver_impl[732cfd3dd2e325d3]::install_ice_hook::{closure#0}
   7:        0x10194dc4c - std::panicking::rust_panic_with_hook::h17facd9c53870157
   8:        0x10194da2c - std::panicking::begin_panic_handler::{{closure}}::h9eab8195c369d860
   9:        0x10194b0c0 - std::sys_common::backtrace::__rust_end_short_backtrace::hce5f67454da3493d
  10:        0x10194d7a0 - _rust_begin_unwind
  11:        0x1019c4a00 - core::panicking::panic_fmt::hc7e96873bfc1c7ba
  12:        0x10076d068 - <rustdoc[f86ba4f83a22955b]::passes::collect_intra_doc_links::LinkCollector>::resolve_path
  13:        0x10076d180 - <rustdoc[f86ba4f83a22955b]::passes::collect_intra_doc_links::LinkCollector>::resolve
  14:        0x100771034 - <rustdoc[f86ba4f83a22955b]::passes::collect_intra_doc_links::LinkCollector>::resolve_links
  15:        0x100778838 - <rustdoc[f86ba4f83a22955b]::passes::collect_intra_doc_links::LinkCollector as rustdoc[f86ba4f83a22955b]::visit::DocVisitor>::visit_inner_recur
  16:        0x100778820 - <rustdoc[f86ba4f83a22955b]::passes::collect_intra_doc_links::LinkCollector as rustdoc[f86ba4f83a22955b]::visit::DocVisitor>::visit_inner_recur
  17:        0x100778820 - <rustdoc[f86ba4f83a22955b]::passes::collect_intra_doc_links::LinkCollector as rustdoc[f86ba4f83a22955b]::visit::DocVisitor>::visit_inner_recur
  18:        0x10076bfd4 - rustdoc[f86ba4f83a22955b]::passes::collect_intra_doc_links::collect_intra_doc_links
  19:        0x10076126c - <rustc_session[1d7b5ca99579105d]::session::Session>::time::<rustdoc[f86ba4f83a22955b]::clean::types::Crate, rustdoc[f86ba4f83a22955b]::core::run_global_ctxt::{closure#7}>
  20:        0x100877d04 - rustdoc[f86ba4f83a22955b]::core::run_global_ctxt
  21:        0x1007615a8 - <rustc_session[1d7b5ca99579105d]::session::Session>::time::<(rustdoc[f86ba4f83a22955b]::clean::types::Crate, rustdoc[f86ba4f83a22955b]::config::RenderOptions, rustdoc[f86ba4f83a22955b]::formats::cache::Cache), rustdoc[f86ba4f83a22955b]::main_args::{closure#1}::{closure#0}::{closure#0}::{closure#0}>
  22:        0x100910274 - <rustc_middle[7e3caebc53abe2aa]::ty::context::GlobalCtxt>::enter::<rustdoc[f86ba4f83a22955b]::main_args::{closure#1}::{closure#0}::{closure#0}, core[d635094314abd71]::result::Result<(), rustc_span[c72d93d8a9f8a382]::ErrorGuaranteed>>
  23:        0x10071f4f8 - <rustc_interface[91fb003f3a234889]::interface::Compiler>::enter::<rustdoc[f86ba4f83a22955b]::main_args::{closure#1}::{closure#0}, core[d635094314abd71]::result::Result<(), rustc_span[c72d93d8a9f8a382]::ErrorGuaranteed>>
  24:        0x1008cfffc - rustc_span[c72d93d8a9f8a382]::set_source_map::<core[d635094314abd71]::result::Result<(), rustc_span[c72d93d8a9f8a382]::ErrorGuaranteed>, rustc_interface[91fb003f3a234889]::interface::run_compiler<core[d635094314abd71]::result::Result<(), rustc_span[c72d93d8a9f8a382]::ErrorGuaranteed>, rustdoc[f86ba4f83a22955b]::main_args::{closure#1}>::{closure#0}::{closure#0}>
  25:        0x10069feb0 - <scoped_tls[6a70c94d6f3f123d]::ScopedKey<rustc_span[c72d93d8a9f8a382]::SessionGlobals>>::set::<rustc_interface[91fb003f3a234889]::interface::run_compiler<core[d635094314abd71]::result::Result<(), rustc_span[c72d93d8a9f8a382]::ErrorGuaranteed>, rustdoc[f86ba4f83a22955b]::main_args::{closure#1}>::{closure#0}, core[d635094314abd71]::result::Result<(), rustc_span[c72d93d8a9f8a382]::ErrorGuaranteed>>
  26:        0x10078a26c - std[efadba9af302a35a]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[91fb003f3a234889]::util::run_in_thread_pool_with_globals<rustc_interface[91fb003f3a234889]::interface::run_compiler<core[d635094314abd71]::result::Result<(), rustc_span[c72d93d8a9f8a382]::ErrorGuaranteed>, rustdoc[f86ba4f83a22955b]::main_args::{closure#1}>::{closure#0}, core[d635094314abd71]::result::Result<(), rustc_span[c72d93d8a9f8a382]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[d635094314abd71]::result::Result<(), rustc_span[c72d93d8a9f8a382]::ErrorGuaranteed>>
  27:        0x100860114 - <<std[efadba9af302a35a]::thread::Builder>::spawn_unchecked_<rustc_interface[91fb003f3a234889]::util::run_in_thread_pool_with_globals<rustc_interface[91fb003f3a234889]::interface::run_compiler<core[d635094314abd71]::result::Result<(), rustc_span[c72d93d8a9f8a382]::ErrorGuaranteed>, rustdoc[f86ba4f83a22955b]::main_args::{closure#1}>::{closure#0}, core[d635094314abd71]::result::Result<(), rustc_span[c72d93d8a9f8a382]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[d635094314abd71]::result::Result<(), rustc_span[c72d93d8a9f8a382]::ErrorGuaranteed>>::{closure#1} as core[d635094314abd71]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  28:        0x101956660 - std::sys::unix::thread::Thread::new::thread_start::h999abeaf027c3bba
  29:        0x19daebfa8 - __pthread_joiner_wake

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: rustc 1.71.0 (8ede3aae2 2023-07-12) running on aarch64-apple-darwin

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 `curv-kzen`

Caused by:
  process didn't exit successfully: `/Users/morj/.local/share/rustup/toolchains/stable-aarch64-apple-darwin/bin/rustdoc --edition=2018 --crate-type lib --crate-name curv /Users/morj/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/curv-kzen-0.9.0/src/lib.rs --cap-lints allow -o /Users/morj/Projects/temp/kzens/target/doc --cfg 'feature="default"' --cfg 'feature="rust-gmp-kzen"' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=212 -C metadata=4f69b3260aae03d6 -L dependency=/Users/morj/Projects/temp/kzens/target/debug/deps --extern cryptoxide=/Users/morj/Projects/temp/kzens/target/debug/deps/libcryptoxide-e54e73e90ab689b2.rmeta --extern curve25519_dalek=/Users/morj/Projects/temp/kzens/target/debug/deps/libcurve25519_dalek-8c88f36fc72ee53a.rmeta --extern digest=/Users/morj/Projects/temp/kzens/target/debug/deps/libdigest-b66a6760970856b7.rmeta --extern ff_zeroize=/Users/morj/Projects/temp/kzens/target/debug/deps/libff_zeroize-3272690f5523f673.rmeta --extern generic_array=/Users/morj/Projects/temp/kzens/target/debug/deps/libgeneric_array-04f4cb8eb64a3539.rmeta --extern hex=/Users/morj/Projects/temp/kzens/target/debug/deps/libhex-0f452bc1418f7b7c.rmeta --extern hmac=/Users/morj/Projects/temp/kzens/target/debug/deps/libhmac-bd16535942186450.rmeta --extern lazy_static=/Users/morj/Projects/temp/kzens/target/debug/deps/liblazy_static-be40a32012830009.rmeta --extern merkle_cbt=/Users/morj/Projects/temp/kzens/target/debug/deps/libmerkle_cbt-890ad5c05efb16de.rmeta --extern num_integer=/Users/morj/Projects/temp/kzens/target/debug/deps/libnum_integer-3eefe57ca676eb31.rmeta --extern num_traits=/Users/morj/Projects/temp/kzens/target/debug/deps/libnum_traits-fa88b4e5a6aed45d.rmeta --extern p256=/Users/morj/Projects/temp/kzens/target/debug/deps/libp256-3624f410434bd08b.rmeta --extern pairing_plus=/Users/morj/Projects/temp/kzens/target/debug/deps/libpairing_plus-31ccac1f04ab19a6.rmeta --extern rand_legacy=/Users/morj/Projects/temp/kzens/target/debug/deps/librand-49cdc30b07e7d5a7.rmeta --extern rand=/Users/morj/Projects/temp/kzens/target/debug/deps/librand-8483079fee5aa3e1.rmeta --extern gmp=/Users/morj/Projects/temp/kzens/target/debug/deps/libgmp-aa75f612db44b55c.rmeta --extern secp256k1=/Users/morj/Projects/temp/kzens/target/debug/deps/libsecp256k1-0d4c105d970e50f5.rmeta --extern serde=/Users/morj/Projects/temp/kzens/target/debug/deps/libserde-7bd11c0e85247bf1.rmeta --extern serde_bytes=/Users/morj/Projects/temp/kzens/target/debug/deps/libserde_bytes-aca8bb545104714e.rmeta --extern serde_derive=/Users/morj/Projects/temp/kzens/target/debug/deps/libserde_derive-c4c63a6266e349d1.dylib --extern old_sha2=/Users/morj/Projects/temp/kzens/target/debug/deps/libsha2-adfaf1246bc3966a.rmeta --extern sha2=/Users/morj/Projects/temp/kzens/target/debug/deps/libsha2-9654ec665067b966.rmeta --extern sha3=/Users/morj/Projects/temp/kzens/target/debug/deps/libsha3-5f63dff321e9160b.rmeta --extern thiserror=/Users/morj/Projects/temp/kzens/target/debug/deps/libthiserror-6192963a2ee2e32d.rmeta --extern typenum=/Users/morj/Projects/temp/kzens/target/debug/deps/libtypenum-14aa7e9f30005c7f.rmeta --extern zeroize=/Users/morj/Projects/temp/kzens/target/debug/deps/libzeroize-d3b4c01819a4df99.rmeta --crate-version 0.9.0` (exit status: 101)
@maurges maurges 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 Jul 31, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jul 31, 2023
@maurges maurges changed the title ICE with rustdoc at collect_intra_doc_links.rs ICE with rustdoc at collect_intra_doc_links.rs: panicked at 'no resolution for "num_integer" MacroNS' Jul 31, 2023
@fmease
Copy link
Member

fmease commented Jul 31, 2023

I can reproduce it with an older nightly (I was using 2023-07-20) but it seems to be fixed on the latest nightly, can you confirm that?

@rustbot label -needs-triage -T-compiler T-rustdoc A-macros A-intra-doc-links

@rustbot rustbot added A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 31, 2023
@fmease
Copy link
Member

fmease commented Jul 31, 2023

After some digging: This has been fixed by #113958. Original issue: #113896.

@maurges
Copy link
Author

maurges commented Jul 31, 2023

I can confirm that latest nightly doesn't have this issue. Thanks! I'll be checking with nightly in the future =)

@fmease
Copy link
Member

fmease commented Jul 31, 2023

Thanks! This issue can be closed then :)

@maurges maurges closed this as completed Aug 1, 2023
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 A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ 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

3 participants