Skip to content

Running cargo doc causes compiler to crash complaining it could not document nom #102631

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
nazmulidris opened this issue Oct 3, 2022 · 0 comments · Fixed by #102633
Closed
Labels
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.

Comments

@nazmulidris
Copy link

Code

cargo doc

Meta

rustc --version --verbose:

rustc 1.66.0-nightly (57f097ea2 2022-10-01)
binary: rustc
commit-hash: 57f097ea25f2c05f424fc9b9dc50dbd6d399845c
commit-date: 2022-10-01
host: x86_64-unknown-linux-gnu
release: 1.66.0-nightly
LLVM version: 15.0.2

Error output

error: internal compiler error: unexpected panic

note: 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.66.0-nightly (57f097ea2 2022-10-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 `nom`

Caused by:
  process didn't exit successfully: `rustdoc --crate-type lib --crate-name nom /home/nazmul/.cargo/registry/src/github.com-1ecc6299db9ec823/nom-4.2.3/src/lib.rs --cap-lints allow -o /home/nazmul/github/r3bl_rs_utils/target/doc --cfg 'feature="alloc"' --cfg 'feature="std"' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat -C metadata=a97e2426bad123a7 -L dependency=/home/nazmul/github/r3bl_rs_utils/target/debug/deps --extern memchr=/home/nazmul/github/r3bl_rs_utils/target/debug/deps/libmemchr-3370c882cc960afe.rmeta --crate-version 4.2.3 --cfg stable_i128` (exit status: 101)
Backtrace

thread 'rustc' panicked at 'expected non-translatable diagnostic message', compiler/rustc_error_messages/src/lib.rs:348:18
stack backtrace:
   0: rust_begin_unwind
             at /rustc/57f097ea25f2c05f424fc9b9dc50dbd6d399845c/library/std/src/panicking.rs:556:5
   1: core::panicking::panic_fmt
             at /rustc/57f097ea25f2c05f424fc9b9dc50dbd6d399845c/library/core/src/panicking.rs:142:14
   2: <rustc_error_messages::DiagnosticMessage>::expect_str
   3: <rustdoc::passes::check_code_block_syntax::BufferEmitter as rustc_errors::emitter::Emitter>::emit_diagnostic
   4: <rustc_errors::HandlerInner>::emit_diagnostic
   5: <rustc_errors::Handler>::emit_diagnostic
   6: <rustc_errors::ErrorGuaranteed as rustc_errors::diagnostic_builder::EmissionGuarantee>::diagnostic_builder_emit_producing_guarantee
   7: rustc_parse::parser::emit_unclosed_delims
   8: rustc_parse::parse_stream_from_source_str
   9: <core::panic::unwind_safe::AssertUnwindSafe<<rustdoc::passes::check_code_block_syntax::SyntaxChecker>::check_rust_syntax::{closure#2}> as core::ops::function::FnOnce<()>>::call_once
  10: rustc_driver::catch_fatal_errors::<<rustdoc::passes::check_code_block_syntax::SyntaxChecker>::check_rust_syntax::{closure#2}, bool>
  11: <rustdoc::passes::check_code_block_syntax::SyntaxChecker as rustdoc::visit::DocVisitor>::visit_item
  12: <rustdoc::passes::check_code_block_syntax::SyntaxChecker as rustdoc::visit::DocVisitor>::visit_item
  13: rustdoc::passes::check_code_block_syntax::check_code_block_syntax
  14: <rustc_session::session::Session>::time::<rustdoc::clean::types::Crate, rustdoc::core::run_global_ctxt::{closure#7}>
  15: rustdoc::core::run_global_ctxt
  16: <rustc_interface::passes::QueryContext>::enter::<rustdoc::main_options::{closure#0}::{closure#0}::{closure#1}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
  17: <rustc_interface::interface::Compiler>::enter::<rustdoc::main_options::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
  18: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_interface::interface::create_compiler_and_run<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustdoc::main_options::{closure#0}>::{closure#1}>
  19: rustdoc::main_options
  20: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustdoc::main_args::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: internal compiler error: unexpected panic

note: 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.66.0-nightly (57f097ea2 2022-10-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
 Documenting termcolor v1.1.3
error: could not document `nom`

Caused by:
  process didn't exit successfully: `rustdoc --crate-type lib --crate-name nom /home/nazmul/.cargo/registry/src/github.com-1ecc6299db9ec823/nom-4.2.3/src/lib.rs --cap-lints allow -o /home/nazmul/github/r3bl_rs_utils/target/doc --cfg 'feature="alloc"' --cfg 'feature="std"' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat -C metadata=a97e2426bad123a7 -L dependency=/home/nazmul/github/r3bl_rs_utils/target/debug/deps --extern memchr=/home/nazmul/github/r3bl_rs_utils/target/debug/deps/libmemchr-3370c882cc960afe.rmeta --crate-version 4.2.3 --cfg stable_i128` (exit status: 101)

@nazmulidris nazmulidris 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 Oct 3, 2022
@bors bors closed this as completed in f7ca465 Oct 4, 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. 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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant