Skip to content

assertion failure when building rustdoc json output for std #101926

Closed
@tmandry

Description

@tmandry

Commit: 1ec9b66 (beta branch)

$ RUSTDOCFLAGS=--output-format=json ./x.py doc library/std
Building rustbuild
    Finished dev [unoptimized] target(s) in 0.05s
Documenting stage0 std (aarch64-apple-darwin)
 Documenting core v0.0.0 (/Users/tmandry/code/rust-beta/library/core)
thread 'rustc' panicked at 'assertion failed: `(left == right)`
  left: `Item { id: Id("0:3423:123"), crate_id: 0, name: Some("Error"), span: Some(Span { filename: "library/core/src/convert/mod.rs", begin: (587, 4), end: (587, 26) }), visibility: Default, docs: None, links: {}, attrs: [], deprecation: None, inner: Typedef(Typedef { type_: QualifiedPath { name: "Error", args: AngleBracketed { args: [], bindings: [] }, self_type: Generic("U"), trait_: ResolvedPath { name: "TryFrom", id: Id("0:3394:212"), args: Some(AngleBracketed { args: [Type(Generic("T"))], bindings: [] }), param_names: [] } }, generics: Generics { params: [], where_predicates: [] } }) }`,
 right: `Item { id: Id("0:3423:123"), crate_id: 0, name: Some("Error"), span: Some(Span { filename: "library/core/src/convert/mod.rs", begin: (587, 4), end: (587, 26) }), visibility: Default, docs: None, links: {}, attrs: [], deprecation: None, inner: Typedef(Typedef { type_: QualifiedPath { name: "Error", args: AngleBracketed { args: [], bindings: [] }, self_type: Generic("U"), trait_: ResolvedPath { name: "", id: Id("0:3394:212"), args: None, param_names: [] } }, generics: Generics { params: [], where_predicates: [] } }) }`', src/librustdoc/json/mod.rs:234:21
Backtrace
stack backtrace:
   0:        0x1021d3fe0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h188b7ef1c7993e78
   1:        0x102225a54 - core::fmt::write::he84a3004e7af3f34
   2:        0x1021c70c0 - std::io::Write::write_fmt::h9370b50affaab0be
   3:        0x1021d6c24 - std::panicking::default_hook::{{closure}}::hc074f8023cce83ca
   4:        0x1021d698c - std::panicking::default_hook::hef854b51b9b79ff2
   5:        0x109644154 - rustc_driver[8d2050f8429f7bc4]::DEFAULT_HOOK::{closure#0}::{closure#0}
   6:        0x1021d71f8 - std::panicking::rust_panic_with_hook::h1e59e224d558a492
   7:        0x1021d7090 - std::panicking::begin_panic_handler::{{closure}}::he1a9d6ab32bfd8c6
   8:        0x1021d44bc - std::sys_common::backtrace::__rust_end_short_backtrace::he9b94791b02f48cd
   9:        0x1021d6de8 - _rust_begin_unwind
  10:        0x102253968 - core::panicking::panic_fmt::h9fec86f6a9c4146e
  11:        0x1022229a4 - core::panicking::assert_failed_inner::hbff4c2e7ecf09c39
  12:        0x10119a9cc - core[bae5e8ef542d20e5]::panicking::assert_failed::<rustdoc_json_types[cd18b9bd74e3a3fb]::Item, rustdoc_json_types[cd18b9bd74e3a3fb]::Item>
  13:        0x100fca17c - <rustdoc[99c6693644e42dbb]::json::JsonRenderer as rustdoc[99c6693644e42dbb]::formats::renderer::FormatRenderer>::item
  14:        0x100fc57cc - <rustdoc[99c6693644e42dbb]::json::JsonRenderer as rustdoc[99c6693644e42dbb]::formats::renderer::FormatRenderer>::item
  15:        0x101064868 - <core[bae5e8ef542d20e5]::iter::adapters::map::Map<core[bae5e8ef542d20e5]::slice::iter::Iter<rustdoc[99c6693644e42dbb]::formats::Impl>, <rustdoc[99c6693644e42dbb]::json::JsonRenderer>::get_trait_implementors::{closure#0}::{closure#0}> as core[bae5e8ef542d20e5]::iter::traits::iterator::Iterator>::fold::<(), core[bae5e8ef542d20e5]::iter::traits::iterator::Iterator::for_each::call<rustdoc_json_types[cd18b9bd74e3a3fb]::Id, <alloc[60e9ff9c62c1e93b]::vec::Vec<rustdoc_json_types[cd18b9bd74e3a3fb]::Id> as alloc[60e9ff9c62c1e93b]::vec::spec_extend::SpecExtend<rustdoc_json_types[cd18b9bd74e3a3fb]::Id, core[bae5e8ef542d20e5]::iter::adapters::map::Map<core[bae5e8ef542d20e5]::slice::iter::Iter<rustdoc[99c6693644e42dbb]::formats::Impl>, <rustdoc[99c6693644e42dbb]::json::JsonRenderer>::get_trait_implementors::{closure#0}::{closure#0}>>>::spec_extend::{closure#0}>::{closure#0}>
  16:        0x100dec1e0 - <alloc[60e9ff9c62c1e93b]::vec::Vec<rustdoc_json_types[cd18b9bd74e3a3fb]::Id> as alloc[60e9ff9c62c1e93b]::vec::spec_from_iter::SpecFromIter<rustdoc_json_types[cd18b9bd74e3a3fb]::Id, core[bae5e8ef542d20e5]::iter::adapters::map::Map<core[bae5e8ef542d20e5]::slice::iter::Iter<rustdoc[99c6693644e42dbb]::formats::Impl>, <rustdoc[99c6693644e42dbb]::json::JsonRenderer>::get_trait_implementors::{closure#0}::{closure#0}>>>::from_iter
  17:        0x100fc7d08 - <rustdoc[99c6693644e42dbb]::json::JsonRenderer as rustdoc[99c6693644e42dbb]::formats::renderer::FormatRenderer>::item
  18:        0x100fc57cc - <rustdoc[99c6693644e42dbb]::json::JsonRenderer as rustdoc[99c6693644e42dbb]::formats::renderer::FormatRenderer>::item
  19:        0x100fc57cc - <rustdoc[99c6693644e42dbb]::json::JsonRenderer as rustdoc[99c6693644e42dbb]::formats::renderer::FormatRenderer>::item
  20:        0x100f66968 - rustdoc[99c6693644e42dbb]::formats::renderer::run_format::<rustdoc[99c6693644e42dbb]::json::JsonRenderer>
  21:        0x10105284c - rustdoc[99c6693644e42dbb]::run_renderer::<rustdoc[99c6693644e42dbb]::json::JsonRenderer>
  22:        0x100fd15c8 - <rustc_session[282d64e95cd3bf88]::session::Session>::time::<core[bae5e8ef542d20e5]::result::Result<(), rustc_errors[3321b68084f70bb0]::ErrorGuaranteed>, rustdoc[99c6693644e42dbb]::main_options::{closure#0}::{closure#0}::{closure#1}::{closure#2}>
  23:        0x100f30120 - <rustc_interface[db32075e2a9c594e]::passes::QueryContext>::enter::<rustdoc[99c6693644e42dbb]::main_options::{closure#0}::{closure#0}::{closure#1}, core[bae5e8ef542d20e5]::result::Result<(), rustc_errors[3321b68084f70bb0]::ErrorGuaranteed>>
  24:        0x100ee3d30 - <rustc_interface[db32075e2a9c594e]::interface::Compiler>::enter::<rustdoc[99c6693644e42dbb]::main_options::{closure#0}::{closure#0}, core[bae5e8ef542d20e5]::result::Result<(), rustc_errors[3321b68084f70bb0]::ErrorGuaranteed>>
  25:        0x100ffb1f8 - rustc_span[143ffa354e326ede]::with_source_map::<core[bae5e8ef542d20e5]::result::Result<(), rustc_errors[3321b68084f70bb0]::ErrorGuaranteed>, rustc_interface[db32075e2a9c594e]::interface::create_compiler_and_run<core[bae5e8ef542d20e5]::result::Result<(), rustc_errors[3321b68084f70bb0]::ErrorGuaranteed>, rustdoc[99c6693644e42dbb]::main_options::{closure#0}>::{closure#1}>
  26:        0x100f05a14 - rustc_interface[db32075e2a9c594e]::interface::create_compiler_and_run::<core[bae5e8ef542d20e5]::result::Result<(), rustc_errors[3321b68084f70bb0]::ErrorGuaranteed>, rustdoc[99c6693644e42dbb]::main_options::{closure#0}>
  27:        0x10102a554 - <scoped_tls[e8c526b3ddc66487]::ScopedKey<rustc_span[143ffa354e326ede]::SessionGlobals>>::set::<rustdoc[99c6693644e42dbb]::main_args::{closure#0}, core[bae5e8ef542d20e5]::result::Result<(), rustc_errors[3321b68084f70bb0]::ErrorGuaranteed>>
  28:        0x100f15da4 - std[ad4c17a2ddbcabe2]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[db32075e2a9c594e]::util::run_in_thread_pool_with_globals<rustdoc[99c6693644e42dbb]::main_args::{closure#0}, core[bae5e8ef542d20e5]::result::Result<(), rustc_errors[3321b68084f70bb0]::ErrorGuaranteed>>::{closure#0}, core[bae5e8ef542d20e5]::result::Result<(), rustc_errors[3321b68084f70bb0]::ErrorGuaranteed>>
  29:        0x100f16af4 - <<std[ad4c17a2ddbcabe2]::thread::Builder>::spawn_unchecked_<rustc_interface[db32075e2a9c594e]::util::run_in_thread_pool_with_globals<rustdoc[99c6693644e42dbb]::main_args::{closure#0}, core[bae5e8ef542d20e5]::result::Result<(), rustc_errors[3321b68084f70bb0]::ErrorGuaranteed>>::{closure#0}, core[bae5e8ef542d20e5]::result::Result<(), rustc_errors[3321b68084f70bb0]::ErrorGuaranteed>>::{closure#1} as core[bae5e8ef542d20e5]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  30:        0x1021dfa5c - std::sys::unix::thread::Thread::new::thread_start::h7b2f9b83fb320a20
  31:        0x1aa2bc26c - __pthread_deallocate

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.63.0 (4b91a6ea7 2022-08-08) running on aarch64-apple-darwin

note: compiler flags: --crate-type lib -Z unstable-options -Z unstable-options -C symbol-mangling-version=legacy -Z unstable-options -Z unstable-options -Z crate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/") -Z force-unstable-if-unmarked

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

query stack during panic:
end of query stack
error: could not document `core`

Caused by:
  process didn't exit successfully: `/Users/tmandry/code/rust-beta/build/bootstrap/debug/rustdoc --edition=2021 --crate-type lib --crate-name core library/core/src/lib.rs --target aarch64-apple-darwin -o /Users/tmandry/code/rust-beta/build/aarch64-apple-darwin/stage0-std/aarch64-apple-darwin/doc -Zunstable-options --check-cfg 'names()' --check-cfg 'values()' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --markdown-css rust.css --markdown-no-toc -Z unstable-options --resource-suffix 1.64.0 --index-page /Users/tmandry/code/rust-beta/src/doc/index.md -C metadata=1c7d00ee3da5bbaa -L dependency=/Users/tmandry/code/rust-beta/build/aarch64-apple-darwin/stage0-std/aarch64-apple-darwin/release/deps -L dependency=/Users/tmandry/code/rust-beta/build/aarch64-apple-darwin/stage0-std/release/deps --cfg=bootstrap -Csymbol-mangling-version=legacy -Zunstable-options -Zunstable-options '--check-cfg=values(bootstrap)' '--check-cfg=values(stdarch_intel_sde)' '--check-cfg=values(no_fp_fmt_parse)' '--check-cfg=values(no_global_oom_handling)' '--check-cfg=values(freebsd12)' '--check-cfg=values(backtrace_in_libstd)' '--check-cfg=values(target_env,"libnx")' '--check-cfg=values(target_os,"watchos")' '--check-cfg=values(target_arch,"asmjs","spirv","nvptx","nvptx64","le32","xtensa")' '--check-cfg=values(dont_compile_me)' --output-format=json -Dwarnings '-Wrustdoc::invalid_codeblock_attributes' --crate-version 1.64.0-dev '-Zcrate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/")'` (exit status: 101)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustdoc-jsonArea: Rustdoc JSON backendC-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions