Skip to content

ICE: refcell panic in rustdoc on facade crate #48414

Closed
@aturon

Description

@aturon

I got the following ICE when running cargo doc on a facade crate that re-exports various types that use intra-rustdoc links:

thread 'rustc' panicked at 'already borrowed: BorrowMutError', libcore/result.rs:945:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
   1: std::sys_common::backtrace::_print
   2: std::panicking::default_hook::{{closure}}
   3: std::panicking::default_hook
   4: std::panicking::rust_panic_with_hook
   5: std::panicking::begin_panic
   6: std::panicking::begin_panic_fmt
   7: rust_begin_unwind
   8: core::panicking::panic_fmt
   9: core::result::unwrap_failed
  10: rustdoc::clean::inline::record_extern_trait
  11: rustdoc::clean::register_def
  12: <[syntax::ast::Attribute] as rustdoc::clean::Clean<rustdoc::clean::Attributes>>::clean
  13: <rustc::ty::AssociatedItem as rustdoc::clean::Clean<rustdoc::clean::Item>>::clean
  14: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::spec_extend
  15: rustdoc::clean::inline::build_external_trait
  16: rustdoc::clean::inline::record_extern_trait
  17: rustdoc::clean::inline::build_impl
  18: rustdoc::clean::inline::build_impls
  19: rustdoc::clean::inline::try_inline
  20: <rustdoc::doctree::Import as rustdoc::clean::Clean<alloc::vec::Vec<rustdoc::clean::Item>>>::clean
  21: <rustdoc::doctree::Module as rustdoc::clean::Clean<rustdoc::clean::Item>>::clean
  22: <rustdoc::visit_ast::RustdocVisitor<'a, 'tcx, 'rcx> as rustdoc::clean::Clean<rustdoc::clean::Crate>>::clean
  23: rustdoc::core::run_core::{{closure}}
  24: rustc::ty::context::TyCtxt::create_and_enter
  25: rustdoc::core::run_core

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions