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

issue while trying to run cargo doc #113141

Closed
mlytle4218 opened this issue Jun 28, 2023 · 2 comments
Closed

issue while trying to run cargo doc #113141

mlytle4218 opened this issue Jun 28, 2023 · 2 comments
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. 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@mlytle4218
Copy link

Code

<code>

Meta

rustc --version --verbose:

cargo 1.69.0 (6e9a83356 2023-04-12)
rustc 1.69.0 (84c898d65 2023-04-16)
binary: rustc
commit-hash: 84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc
commit-date: 2023-04-16
host: x86_64-unknown-linux-gnu
release: 1.69.0
LLVM version: 15.0.7

Error output

cargo doc
thread 'rustc' panicked at 'no resolutions for a doc link', compiler/rustc_metadata/src/rmeta/encoder.rs:2228:18
stack backtrace:
   0: rust_begin_unwind
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:579:5
   1: core::panicking::panic_fmt
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:64:14
   2: core::panicking::panic_display
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:147:5
   3: core::panicking::panic_str
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:131:5
   4: core::option::expect_failed
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/option.rs:2045:5
   5: <rustc_metadata::rmeta::encoder::provide::{closure#0} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::DefId)>>::call_once
   6: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::queries::doc_link_resolutions, rustc_query_impl::plumbing::QueryCtxt>
   7: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::doc_link_resolutions
   8: <rustdoc::passes::collect_intra_doc_links::LinkCollector>::resolve_path
   9: <rustdoc::passes::collect_intra_doc_links::LinkCollector>::resolve
  10: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::visit::DocVisitor>::visit_item
  11: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::visit::DocVisitor>::visit_inner_recur
  12: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::visit::DocVisitor>::visit_item
  13: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::visit::DocVisitor>::visit_inner_recur
  14: <rustdoc::passes::collect_intra_doc_links::LinkCollector as rustdoc::visit::DocVisitor>::visit_item
  15: rustdoc::passes::collect_intra_doc_links::collect_intra_doc_links
  16: <rustc_session::session::Session>::time::<rustdoc::clean::types::Crate, rustdoc::core::run_global_ctxt::{closure#7}>
  17: rustdoc::core::run_global_ctxt
  18: <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}>
  19: <rustc_middle::ty::context::GlobalCtxt>::enter::<rustdoc::main_args::{closure#1}::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
  20: 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}>
  21: <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 (84c898d65 2023-04-16) 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:
#0 [doc_link_resolutions] resolutions for documentation links for a module
end of query stack
error: could not document `rustix`

Caused by:
  process didn't exit successfully: `rustdoc --edition=2018 --crate-type lib --crate-name rustix /home/marc/.cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.35.9/src/lib.rs --cap-lints allow -o /home/marc/pod-kast-rust/target/doc --cfg 'feature="default"' --cfg 'feature="fs"' --cfg 'feature="io-lifetimes"' --cfg 'feature="libc"' --cfg 'feature="std"' --cfg 'feature="use-libc-auxv"' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=298 -C metadata=fb18a0d31d04f0eb -L dependency=/home/marc/pod-kast-rust/target/debug/deps --extern bitflags=/home/marc/pod-kast-rust/target/debug/deps/libbitflags-1a1c34f79f6e612c.rmeta --extern io_lifetimes=/home/marc/pod-kast-rust/target/debug/deps/libio_lifetimes-d53e346383b81fd2.rmeta --extern libc=/home/marc/pod-kast-rust/target/debug/deps/liblibc-6f3f707741fc0a21.rmeta --extern linux_raw_sys=/home/marc/pod-kast-rust/target/debug/deps/liblinux_raw_sys-ebf0d114ca5d73f6.rmeta --crate-version 0.35.9 --cfg linux_raw --cfg asm` (exit status: 101)
warning: build failed, waiting for other jobs to finish...
Backtrace

<backtrace>

@mlytle4218 mlytle4218 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 Jun 28, 2023
@lukas-code
Copy link
Member

This should be fixed on the latest stable version, 1.70.0.

@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 Jul 3, 2023
@fmease
Copy link
Member

fmease commented Sep 25, 2023

Without a reproducer, there's no way to know if this is a duplicate of one of the many no resolutions for a doc link ICEs that were fixed by #109500.

I'm closing this as can't repro. If you can still reproduce it with the latest version of rustdoc, please ping me so I can reopen it and find a minimal reproducer together with you.

@fmease fmease closed this as not planned Won't fix, can't repro, duplicate, stale Sep 25, 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 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. 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

4 participants