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

ICE when running cargo doc: unexpected region kind: !2_1 #131123

Closed
maboesanman opened this issue Oct 2, 2024 · 2 comments
Closed

ICE when running cargo doc: unexpected region kind: !2_1 #131123

maboesanman opened this issue Oct 2, 2024 · 2 comments
Labels
A-auto-traits Area: auto traits (e.g., `auto trait Send {}`) A-synthetic-impls Area: Synthetic impls, used by rustdoc to document auto traits and traits with blanket impls C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` 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

@maboesanman
Copy link

I'm getting an ICE when invoking cargo doc. on this repository

I have the following nightly only features enabled:

#![feature(hash_raw_entry)]
#![feature(type_alias_impl_trait)]

Code

cargo doc --package=cozal

Meta

rustc --version --verbose:

rustc 1.83.0-nightly (fb4aebddd 2024-09-30)
binary: rustc
commit-hash: fb4aebddd18d258046ddb51fd41589295259a0fa
commit-date: 2024-09-30
host: aarch64-apple-darwin
release: 1.83.0-nightly
LLVM version: 19.1.0

Error output

error: internal compiler error: src/librustdoc/clean/auto_trait.rs:194:21: unexpected region kind: !2_1

thread 'rustc' panicked at src/librustdoc/clean/auto_trait.rs:194:21:
Box<dyn Any>
stack backtrace:
   0:        0x10eb8e1dc - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::hcbe8dce94c4998a0
   1:        0x10bf3d12c - core::fmt::write::h3565bfae1b064ab4
   2:        0x10eb81e8c - std::io::Write::write_fmt::h393fac356fe80426
   3:        0x10eb8e09c - std::sys::backtrace::BacktraceLock::print::h381dc4c3f963a517
   4:        0x10eb905b8 - std::panicking::default_hook::{{closure}}::h0cec836e006d2694
   5:        0x10eb903f0 - std::panicking::default_hook::h6154b0643a0d6cc5
   6:        0x10caf5efc - <alloc[7e9b0e58412c4eba]::boxed::Box<rustc_driver_impl[a59188a279d01948]::install_ice_hook::{closure#0}> as core[986a2d210daabfc2]::ops::function::Fn<(&dyn for<'a, 'b> core[986a2d210daabfc2]::ops::function::Fn<(&'a std[d7a7da502724e93d]::panic::PanicHookInfo<'b>,), Output = ()> + core[986a2d210daabfc2]::marker::Sync + core[986a2d210daabfc2]::marker::Send, &std[d7a7da502724e93d]::panic::PanicHookInfo)>>::call
   7:        0x10eb90e48 - std::panicking::rust_panic_with_hook::ha23707cf27e12afe
   8:        0x10cbc7828 - std[d7a7da502724e93d]::panicking::begin_panic::<rustc_errors[4f6ce07e3a1a6dde]::ExplicitBug>::{closure#0}
   9:        0x10cbc4400 - std[d7a7da502724e93d]::sys::backtrace::__rust_end_short_backtrace::<std[d7a7da502724e93d]::panicking::begin_panic<rustc_errors[4f6ce07e3a1a6dde]::ExplicitBug>::{closure#0}, !>
  10:        0x11128c80c - std[d7a7da502724e93d]::panicking::begin_panic::<rustc_errors[4f6ce07e3a1a6dde]::ExplicitBug>
  11:        0x10cba660c - <rustc_errors[4f6ce07e3a1a6dde]::diagnostic::BugAbort as rustc_errors[4f6ce07e3a1a6dde]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
  12:        0x10d8ea038 - rustc_middle[74a3a980942a318e]::util::bug::opt_span_bug_fmt::<rustc_span[b159bff907dfcfda]::span_encoding::Span>::{closure#0}
  13:        0x10d8e9f78 - rustc_middle[74a3a980942a318e]::ty::context::tls::with_opt::<rustc_middle[74a3a980942a318e]::util::bug::opt_span_bug_fmt<rustc_span[b159bff907dfcfda]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  14:        0x10d8e9f44 - rustc_middle[74a3a980942a318e]::ty::context::tls::with_context_opt::<rustc_middle[74a3a980942a318e]::ty::context::tls::with_opt<rustc_middle[74a3a980942a318e]::util::bug::opt_span_bug_fmt<rustc_span[b159bff907dfcfda]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  15:        0x111333f74 - rustc_middle[74a3a980942a318e]::util::bug::bug_fmt
  16:        0x100c19b54 - rustdoc[f694b0418ccc54ef]::clean::auto_trait::clean_param_env::{closure#3}::{closure#0}
  17:        0x100cc3c74 - rustc_middle[74a3a980942a318e]::ty::util::fold_list::<rustc_middle[74a3a980942a318e]::ty::fold::RegionFolder, &rustc_middle[74a3a980942a318e]::ty::list::RawList<(), rustc_middle[74a3a980942a318e]::ty::generic_args::GenericArg>, rustc_middle[74a3a980942a318e]::ty::generic_args::GenericArg, <&rustc_middle[74a3a980942a318e]::ty::list::RawList<(), rustc_middle[74a3a980942a318e]::ty::generic_args::GenericArg> as rustc_type_ir[9cd1ec74b63a3e5d]::fold::TypeFoldable<rustc_middle[74a3a980942a318e]::ty::context::TyCtxt>>::try_fold_with<rustc_middle[74a3a980942a318e]::ty::fold::RegionFolder>::{closure#0}>
  18:        0x100b47b18 - <rustc_middle[74a3a980942a318e]::ty::Ty as rustc_type_ir[9cd1ec74b63a3e5d]::fold::TypeSuperFoldable<rustc_middle[74a3a980942a318e]::ty::context::TyCtxt>>::super_fold_with::<rustc_middle[74a3a980942a318e]::ty::fold::RegionFolder>
  19:        0x100c01c8c - <&rustc_middle[74a3a980942a318e]::ty::list::RawList<(), rustc_middle[74a3a980942a318e]::ty::generic_args::GenericArg> as rustc_type_ir[9cd1ec74b63a3e5d]::fold::TypeFoldable<rustc_middle[74a3a980942a318e]::ty::context::TyCtxt>>::try_fold_with::<rustc_middle[74a3a980942a318e]::ty::fold::RegionFolder>
  20:        0x100ac50a8 - <rustc_type_ir[9cd1ec74b63a3e5d]::predicate_kind::PredicateKind<rustc_middle[74a3a980942a318e]::ty::context::TyCtxt> as rustc_type_ir[9cd1ec74b63a3e5d]::fold::TypeFoldable<rustc_middle[74a3a980942a318e]::ty::context::TyCtxt>>::try_fold_with::<rustc_middle[74a3a980942a318e]::ty::fold::RegionFolder>
  21:        0x100bf7fcc - <rustc_middle[74a3a980942a318e]::ty::fold::RegionFolder as rustc_type_ir[9cd1ec74b63a3e5d]::fold::FallibleTypeFolder<rustc_middle[74a3a980942a318e]::ty::context::TyCtxt>>::try_fold_binder::<rustc_type_ir[9cd1ec74b63a3e5d]::predicate_kind::PredicateKind<rustc_middle[74a3a980942a318e]::ty::context::TyCtxt>>
  22:        0x100a64b10 - rustdoc[f694b0418ccc54ef]::clean::auto_trait::synthesize_auto_trait_impl
  23:        0x100a0535c - <alloc[7e9b0e58412c4eba]::vec::Vec<rustdoc[f694b0418ccc54ef]::clean::types::Item> as alloc[7e9b0e58412c4eba]::vec::spec_from_iter::SpecFromIter<rustdoc[f694b0418ccc54ef]::clean::types::Item, core[986a2d210daabfc2]::iter::adapters::filter_map::FilterMap<alloc[7e9b0e58412c4eba]::vec::into_iter::IntoIter<rustc_span[b159bff907dfcfda]::def_id::DefId>, rustdoc[f694b0418ccc54ef]::clean::auto_trait::synthesize_auto_trait_impls::{closure#0}>>>::from_iter
  24:        0x100a62724 - rustdoc[f694b0418ccc54ef]::clean::auto_trait::synthesize_auto_trait_impls
  25:        0x100b56370 - rustdoc[f694b0418ccc54ef]::clean::utils::synthesize_auto_trait_and_blanket_impls
  26:        0x100a61d08 - <rustdoc[f694b0418ccc54ef]::passes::collect_trait_impls::SyntheticImplCollector as rustdoc[f694b0418ccc54ef]::visit::DocVisitor>::visit_item
  27:        0x100a61a40 - <rustdoc[f694b0418ccc54ef]::passes::collect_trait_impls::SyntheticImplCollector as rustdoc[f694b0418ccc54ef]::visit::DocVisitor>::visit_item
  28:        0x100a61a40 - <rustdoc[f694b0418ccc54ef]::passes::collect_trait_impls::SyntheticImplCollector as rustdoc[f694b0418ccc54ef]::visit::DocVisitor>::visit_item
  29:        0x100a61a40 - <rustdoc[f694b0418ccc54ef]::passes::collect_trait_impls::SyntheticImplCollector as rustdoc[f694b0418ccc54ef]::visit::DocVisitor>::visit_item
  30:        0x100a61a40 - <rustdoc[f694b0418ccc54ef]::passes::collect_trait_impls::SyntheticImplCollector as rustdoc[f694b0418ccc54ef]::visit::DocVisitor>::visit_item
  31:        0x100c66100 - <rustc_session[5b57ec7c78240d07]::session::Session>::time::<alloc[7e9b0e58412c4eba]::vec::Vec<rustdoc[f694b0418ccc54ef]::clean::types::Item>, rustdoc[f694b0418ccc54ef]::passes::collect_trait_impls::collect_trait_impls::{closure#0}>
  32:        0x100a5fd24 - rustdoc[f694b0418ccc54ef]::passes::collect_trait_impls::collect_trait_impls
  33:        0x100c67388 - <rustc_session[5b57ec7c78240d07]::session::Session>::time::<rustdoc[f694b0418ccc54ef]::clean::types::Crate, rustdoc[f694b0418ccc54ef]::core::run_global_ctxt::{closure#6}>
  34:        0x100d75e90 - rustdoc[f694b0418ccc54ef]::core::run_global_ctxt
  35:        0x100c66374 - <rustc_session[5b57ec7c78240d07]::session::Session>::time::<core[986a2d210daabfc2]::result::Result<(rustdoc[f694b0418ccc54ef]::clean::types::Crate, rustdoc[f694b0418ccc54ef]::config::RenderOptions, rustdoc[f694b0418ccc54ef]::formats::cache::Cache), rustc_span[b159bff907dfcfda]::ErrorGuaranteed>, rustdoc[f694b0418ccc54ef]::main_args::{closure#2}::{closure#0}::{closure#0}::{closure#0}>
  36:        0x100beac28 - <rustc_interface[11996f6d6fb9bfaf]::queries::QueryResult<&rustc_middle[74a3a980942a318e]::ty::context::GlobalCtxt>>::enter::<core[986a2d210daabfc2]::result::Result<(), rustc_span[b159bff907dfcfda]::ErrorGuaranteed>, rustdoc[f694b0418ccc54ef]::main_args::{closure#2}::{closure#0}::{closure#0}>
  37:        0x100a4f84c - rustc_interface[11996f6d6fb9bfaf]::interface::run_compiler::<core[986a2d210daabfc2]::result::Result<(), rustc_span[b159bff907dfcfda]::ErrorGuaranteed>, rustdoc[f694b0418ccc54ef]::main_args::{closure#2}>::{closure#1}
  38:        0x100a0ea6c - rustc_span[b159bff907dfcfda]::create_session_globals_then::<core[986a2d210daabfc2]::result::Result<(), rustc_span[b159bff907dfcfda]::ErrorGuaranteed>, rustc_interface[11996f6d6fb9bfaf]::util::run_in_thread_with_globals<rustc_interface[11996f6d6fb9bfaf]::util::run_in_thread_pool_with_globals<rustc_interface[11996f6d6fb9bfaf]::interface::run_compiler<core[986a2d210daabfc2]::result::Result<(), rustc_span[b159bff907dfcfda]::ErrorGuaranteed>, rustdoc[f694b0418ccc54ef]::main_args::{closure#2}>::{closure#1}, core[986a2d210daabfc2]::result::Result<(), rustc_span[b159bff907dfcfda]::ErrorGuaranteed>>::{closure#0}, core[986a2d210daabfc2]::result::Result<(), rustc_span[b159bff907dfcfda]::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}>
  39:        0x100b0c95c - std[d7a7da502724e93d]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[11996f6d6fb9bfaf]::util::run_in_thread_with_globals<rustc_interface[11996f6d6fb9bfaf]::util::run_in_thread_pool_with_globals<rustc_interface[11996f6d6fb9bfaf]::interface::run_compiler<core[986a2d210daabfc2]::result::Result<(), rustc_span[b159bff907dfcfda]::ErrorGuaranteed>, rustdoc[f694b0418ccc54ef]::main_args::{closure#2}>::{closure#1}, core[986a2d210daabfc2]::result::Result<(), rustc_span[b159bff907dfcfda]::ErrorGuaranteed>>::{closure#0}, core[986a2d210daabfc2]::result::Result<(), rustc_span[b159bff907dfcfda]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[986a2d210daabfc2]::result::Result<(), rustc_span[b159bff907dfcfda]::ErrorGuaranteed>>
  40:        0x100a7d288 - <<std[d7a7da502724e93d]::thread::Builder>::spawn_unchecked_<rustc_interface[11996f6d6fb9bfaf]::util::run_in_thread_with_globals<rustc_interface[11996f6d6fb9bfaf]::util::run_in_thread_pool_with_globals<rustc_interface[11996f6d6fb9bfaf]::interface::run_compiler<core[986a2d210daabfc2]::result::Result<(), rustc_span[b159bff907dfcfda]::ErrorGuaranteed>, rustdoc[f694b0418ccc54ef]::main_args::{closure#2}>::{closure#1}, core[986a2d210daabfc2]::result::Result<(), rustc_span[b159bff907dfcfda]::ErrorGuaranteed>>::{closure#0}, core[986a2d210daabfc2]::result::Result<(), rustc_span[b159bff907dfcfda]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[986a2d210daabfc2]::result::Result<(), rustc_span[b159bff907dfcfda]::ErrorGuaranteed>>::{closure#1} as core[986a2d210daabfc2]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  41:        0x10eb9b3d4 - std::sys::pal::unix::thread::Thread::new::thread_start::h044f07dcec563849
  42:        0x18f12ef94 - __pthread_joiner_wake

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: please make sure that you have updated to the latest nightly

note: please attach the file at `/Users/mason/Source/github.com/maboesanman/rhythmium/rustc-ice-2024-10-02T01_30_25-18968.txt` to your bug report

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
Backtrace

<backtrace>

@maboesanman maboesanman 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 2, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Oct 2, 2024
@kpreid
Copy link
Contributor

kpreid commented Oct 2, 2024

@rustbot label +E-needs-mcve

@rustbot rustbot added the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label Oct 2, 2024
@fmease fmease added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` A-auto-traits Area: auto traits (e.g., `auto trait Send {}`) and removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Oct 2, 2024
@fmease
Copy link
Member

fmease commented Oct 2, 2024

Duplicate of #120606

@fmease fmease marked this as a duplicate of #120606 Oct 2, 2024
@fmease fmease closed this as not planned Won't fix, can't repro, duplicate, stale Oct 2, 2024
@fmease fmease added the A-synthetic-impls Area: Synthetic impls, used by rustdoc to document auto traits and traits with blanket impls label Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-auto-traits Area: auto traits (e.g., `auto trait Send {}`) A-synthetic-impls Area: Synthetic impls, used by rustdoc to document auto traits and traits with blanket impls C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` 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

4 participants