Skip to content

Compiler panicking when using rayon's foo.into_par_iter().zip(bar.par_iter_mut()); #110125

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
germolinal opened this issue Apr 9, 2023 · 1 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.

Comments

@germolinal
Copy link

Hey, so I was compiling a project and I found a bug that was directed to here.

You can reproduce this error by using my project as explained below. I am happy to answer other questions, but I am not sure I even know where to look. I'll try to get a smaller example.

git clone -b rustc_bug https://github.com/SIMPLE-BuildingSimulation/heat.git
cd heat
cargo check --features parallel

Code

/* The problem is in line 206 of file src/model.rs */

// ...
) -> Result<(), String> {

    #[cfg(not(feature = "parallel"))]
    let surface_iter = surfaces.iter().zip(alloc.iter_mut());
    #[cfg(feature = "parallel")]
    let surface_iter = surfaces.into_par_iter().zip(alloc.par_iter_mut()); // <-- When the iterator is produced like this

    

    let results = surface_iter.map(
        |d: (&ThermalSurfaceData<T>, &mut SurfaceMemory)| -> Result<(), String> { // <-- (that iterator is used for this).
// ...

Meta

rustc --version --verbose:

rustc 1.68.2 (9eb3afe9e 2023-03-27)
binary: rustc
commit-hash: 9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0
commit-date: 2023-03-27
host: aarch64-apple-darwin
release: 1.68.2
LLVM version: 15.0.6

Error output

    Checking heat v1.0.0 (/Users/germolinal/Desktop/heat)
error: internal compiler error: compiler/rustc_infer/src/infer/region_constraints/mod.rs:568:17: cannot relate bound region: ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:473 ~ heat[9e0d]::model::iterate_surfaces::'_), '_) }) <= '_#22r

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0/compiler/rustc_errors/src/lib.rs:987:33
stack backtrace:
   0:        0x1050c6978 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h3c406a4521928e59
   1:        0x105116cf0 - core::fmt::write::hc60df9bae744c40c
   2:        0x1050ba374 - std::io::Write::write_fmt::h1c4129dfc94f7c33
   3:        0x1050c678c - std::sys_common::backtrace::print::h34db077f1fa49c76
   4:        0x1050c92e0 - std::panicking::default_hook::{{closure}}::hff4fe3239c020cef
   5:        0x1050c9038 - std::panicking::default_hook::hd2988fbcc86fdc46
   6:        0x10d3ad400 - rustc_driver[b67fef72c303079b]::DEFAULT_HOOK::{closure#0}::{closure#0}
   7:        0x1050c99d8 - std::panicking::rust_panic_with_hook::h01730ad11d62092c
   8:        0x11102d6dc - std[8dc9805012fd1cea]::panicking::begin_panic::<rustc_errors[fe326c1ebc0a7364]::ExplicitBug>::{closure#0}
   9:        0x111027788 - std[8dc9805012fd1cea]::sys_common::backtrace::__rust_end_short_backtrace::<std[8dc9805012fd1cea]::panicking::begin_panic<rustc_errors[fe326c1ebc0a7364]::ExplicitBug>::{closure#0}, !>
  10:        0x1116d5d98 - std[8dc9805012fd1cea]::panicking::begin_panic::<rustc_errors[fe326c1ebc0a7364]::ExplicitBug>
  11:        0x1110d3ea8 - std[8dc9805012fd1cea]::panic::panic_any::<rustc_errors[fe326c1ebc0a7364]::ExplicitBug>
  12:        0x1110d13e4 - <rustc_errors[fe326c1ebc0a7364]::HandlerInner>::span_bug::<rustc_span[cd726bea196c4eb]::span_encoding::Span, &alloc[97d6479c9973beab]::string::String>
  13:        0x1110d122c - <rustc_errors[fe326c1ebc0a7364]::Handler>::span_bug::<rustc_span[cd726bea196c4eb]::span_encoding::Span, &alloc[97d6479c9973beab]::string::String>
  14:        0x11106d6e0 - rustc_middle[9a7f1a42d06ddbac]::util::bug::opt_span_bug_fmt::<rustc_span[cd726bea196c4eb]::span_encoding::Span>::{closure#0}
  15:        0x11106d9d8 - rustc_middle[9a7f1a42d06ddbac]::ty::context::tls::with_opt::<rustc_middle[9a7f1a42d06ddbac]::util::bug::opt_span_bug_fmt<rustc_span[cd726bea196c4eb]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  16:        0x11106cf40 - rustc_middle[9a7f1a42d06ddbac]::ty::context::tls::with_context_opt::<rustc_middle[9a7f1a42d06ddbac]::ty::context::tls::with_opt<rustc_middle[9a7f1a42d06ddbac]::util::bug::opt_span_bug_fmt<rustc_span[cd726bea196c4eb]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  17:        0x11106cefc - rustc_middle[9a7f1a42d06ddbac]::util::bug::opt_span_bug_fmt::<rustc_span[cd726bea196c4eb]::span_encoding::Span>
  18:        0x1116d1b20 - rustc_middle[9a7f1a42d06ddbac]::util::bug::span_bug_fmt::<rustc_span[cd726bea196c4eb]::span_encoding::Span>
  19:        0x11106824c - <rustc_infer[fd41469e2d6b21d1]::infer::region_constraints::RegionConstraintCollector>::make_subregion
  20:        0x111062730 - <rustc_infer[fd41469e2d6b21d1]::infer::region_constraints::RegionConstraintCollector>::make_eqregion
  21:        0x111072688 - <rustc_infer[fd41469e2d6b21d1]::infer::equate::Equate as rustc_middle[9a7f1a42d06ddbac]::ty::relate::TypeRelation>::regions
  22:        0x111078ec0 - rustc_middle[9a7f1a42d06ddbac]::ty::relate::super_relate_tys::<rustc_infer[fd41469e2d6b21d1]::infer::equate::Equate>
  23:        0x1110758b0 - <rustc_infer[fd41469e2d6b21d1]::infer::equate::Equate as rustc_middle[9a7f1a42d06ddbac]::ty::relate::TypeRelation>::tys
  24:        0x11104f1bc - <core[cead920de05078ba]::result::Result<rustc_middle[9a7f1a42d06ddbac]::ty::Ty, rustc_middle[9a7f1a42d06ddbac]::ty::error::TypeError> as rustc_type_ir[72af779b5d6fb6af]::InternIteratorElement<rustc_middle[9a7f1a42d06ddbac]::ty::Ty, rustc_middle[9a7f1a42d06ddbac]::ty::Ty>>::intern_with::<core[cead920de05078ba]::iter::adapters::map::Map<core[cead920de05078ba]::iter::adapters::zip::Zip<core[cead920de05078ba]::iter::adapters::copied::Copied<core[cead920de05078ba]::slice::iter::Iter<rustc_middle[9a7f1a42d06ddbac]::ty::Ty>>, core[cead920de05078ba]::iter::adapters::copied::Copied<core[cead920de05078ba]::slice::iter::Iter<rustc_middle[9a7f1a42d06ddbac]::ty::Ty>>>, rustc_middle[9a7f1a42d06ddbac]::ty::relate::super_relate_tys<rustc_infer[fd41469e2d6b21d1]::infer::equate::Equate>::{closure#2}>, <rustc_middle[9a7f1a42d06ddbac]::ty::context::TyCtxt>::mk_tup<core[cead920de05078ba]::iter::adapters::map::Map<core[cead920de05078ba]::iter::adapters::zip::Zip<core[cead920de05078ba]::iter::adapters::copied::Copied<core[cead920de05078ba]::slice::iter::Iter<rustc_middle[9a7f1a42d06ddbac]::ty::Ty>>, core[cead920de05078ba]::iter::adapters::copied::Copied<core[cead920de05078ba]::slice::iter::Iter<rustc_middle[9a7f1a42d06ddbac]::ty::Ty>>>, rustc_middle[9a7f1a42d06ddbac]::ty::relate::super_relate_tys<rustc_infer[fd41469e2d6b21d1]::infer::equate::Equate>::{closure#2}>>::{closure#0}>
  25:        0x111078f4c - rustc_middle[9a7f1a42d06ddbac]::ty::relate::super_relate_tys::<rustc_infer[fd41469e2d6b21d1]::infer::equate::Equate>
  26:        0x1110758b0 - <rustc_infer[fd41469e2d6b21d1]::infer::equate::Equate as rustc_middle[9a7f1a42d06ddbac]::ty::relate::TypeRelation>::tys
  27:        0x110eaa904 - <rustc_infer[fd41469e2d6b21d1]::infer::InferCtxt>::commit_if_ok::<rustc_infer[fd41469e2d6b21d1]::infer::InferOk<()>, rustc_middle[9a7f1a42d06ddbac]::ty::error::TypeError, <rustc_infer[fd41469e2d6b21d1]::infer::at::Trace>::eq<rustc_middle[9a7f1a42d06ddbac]::ty::Ty>::{closure#0}>
  28:        0x110eb2ef8 - <rustc_infer[fd41469e2d6b21d1]::infer::InferCtxt>::can_eq::<rustc_middle[9a7f1a42d06ddbac]::ty::Ty>
  29:        0x110e8eec8 - rustc_trait_selection[5d3b92e82741b5e5]::traits::error_reporting::suggestions::hint_missing_borrow
  30:        0x110f57f70 - <rustc_infer[fd41469e2d6b21d1]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[5d3b92e82741b5e5]::traits::error_reporting::suggestions::TypeErrCtxtExt>::report_closure_arg_mismatch
  31:        0x110f66370 - <rustc_infer[fd41469e2d6b21d1]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[5d3b92e82741b5e5]::traits::error_reporting::TypeErrCtxtExt>::report_selection_error
  32:        0x110f6f944 - <rustc_infer[fd41469e2d6b21d1]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[5d3b92e82741b5e5]::traits::error_reporting::InferCtxtPrivExt>::report_fulfillment_error
  33:        0x110f60e78 - <rustc_infer[fd41469e2d6b21d1]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[5d3b92e82741b5e5]::traits::error_reporting::TypeErrCtxtExt>::report_fulfillment_errors
  34:        0x10f66ce50 - <rustc_hir_typeck[b1e8f06aef2c6f14]::fn_ctxt::FnCtxt>::resolve_vars_with_obligations
  35:        0x10f6ab820 - <rustc_hir_typeck[b1e8f06aef2c6f14]::fn_ctxt::FnCtxt>::demand_coerce_diag
  36:        0x10f660400 - <rustc_hir_typeck[b1e8f06aef2c6f14]::fn_ctxt::FnCtxt>::demand_coerce
  37:        0x10f67829c - <rustc_hir_typeck[b1e8f06aef2c6f14]::fn_ctxt::FnCtxt>::check_decl
  38:        0x10f6786b4 - <rustc_hir_typeck[b1e8f06aef2c6f14]::fn_ctxt::FnCtxt>::check_stmt
  39:        0x10f678dd4 - <rustc_hir_typeck[b1e8f06aef2c6f14]::fn_ctxt::FnCtxt>::check_block_with_expected
  40:        0x10f6ac348 - <rustc_hir_typeck[b1e8f06aef2c6f14]::fn_ctxt::FnCtxt>::check_expr_kind
  41:        0x10f6658bc - <rustc_hir_typeck[b1e8f06aef2c6f14]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  42:        0x10f666b9c - <rustc_hir_typeck[b1e8f06aef2c6f14]::fn_ctxt::FnCtxt>::check_return_expr
  43:        0x10f708a80 - rustc_hir_typeck[b1e8f06aef2c6f14]::check::check_fn
  44:        0x10f7361c8 - rustc_hir_typeck[b1e8f06aef2c6f14]::typeck
  45:        0x110624cf4 - <rustc_query_system[a99348637a748513]::dep_graph::graph::DepGraph<rustc_middle[9a7f1a42d06ddbac]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[9a7f1a42d06ddbac]::ty::context::TyCtxt, rustc_span[cd726bea196c4eb]::def_id::LocalDefId, &rustc_middle[9a7f1a42d06ddbac]::ty::typeck_results::TypeckResults>
  46:        0x110471fe4 - rustc_query_system[a99348637a748513]::query::plumbing::try_execute_query::<rustc_query_impl[e6483fe3d2d29454]::queries::typeck, rustc_query_impl[e6483fe3d2d29454]::plumbing::QueryCtxt>
  47:        0x11037c620 - rustc_query_system[a99348637a748513]::query::plumbing::force_query::<rustc_query_impl[e6483fe3d2d29454]::queries::typeck, rustc_query_impl[e6483fe3d2d29454]::plumbing::QueryCtxt, rustc_middle[9a7f1a42d06ddbac]::dep_graph::dep_node::DepKind>
  48:        0x1106bb7b8 - rustc_query_impl[e6483fe3d2d29454]::plumbing::force_from_dep_node::<rustc_query_impl[e6483fe3d2d29454]::queries::typeck>
  49:        0x1106163f4 - <rustc_query_system[a99348637a748513]::dep_graph::graph::DepGraph<rustc_middle[9a7f1a42d06ddbac]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[e6483fe3d2d29454]::plumbing::QueryCtxt>
  50:        0x1106153d4 - <rustc_query_system[a99348637a748513]::dep_graph::graph::DepGraph<rustc_middle[9a7f1a42d06ddbac]::dep_graph::dep_node::DepKind>>::try_mark_green::<rustc_query_impl[e6483fe3d2d29454]::plumbing::QueryCtxt>
  51:        0x11049b184 - rustc_query_system[a99348637a748513]::query::plumbing::try_load_from_disk_and_cache_in_memory::<rustc_query_impl[e6483fe3d2d29454]::queries::typeck_item_bodies, rustc_query_impl[e6483fe3d2d29454]::plumbing::QueryCtxt>
  52:        0x110401184 - rustc_query_system[a99348637a748513]::query::plumbing::try_execute_query::<rustc_query_impl[e6483fe3d2d29454]::queries::typeck_item_bodies, rustc_query_impl[e6483fe3d2d29454]::plumbing::QueryCtxt>
  53:        0x11056a084 - <rustc_query_impl[e6483fe3d2d29454]::Queries as rustc_middle[9a7f1a42d06ddbac]::ty::query::QueryEngine>::typeck_item_bodies
  54:        0x10f880bb4 - <rustc_session[35ac6c007884beb3]::session::Session>::time::<(), rustc_hir_analysis[8c6c434a41694f32]::check_crate::{closure#7}>
  55:        0x10f838978 - rustc_hir_analysis[8c6c434a41694f32]::check_crate
  56:        0x10d44b638 - rustc_interface[68ba7ba60dcf80eb]::passes::analysis
  57:        0x11064b914 - <rustc_query_system[a99348637a748513]::dep_graph::graph::DepGraph<rustc_middle[9a7f1a42d06ddbac]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[9a7f1a42d06ddbac]::ty::context::TyCtxt, (), core[cead920de05078ba]::result::Result<(), rustc_errors[fe326c1ebc0a7364]::ErrorGuaranteed>>
  58:        0x11047450c - rustc_query_system[a99348637a748513]::query::plumbing::try_execute_query::<rustc_query_impl[e6483fe3d2d29454]::queries::analysis, rustc_query_impl[e6483fe3d2d29454]::plumbing::QueryCtxt>
  59:        0x110567324 - <rustc_query_impl[e6483fe3d2d29454]::Queries as rustc_middle[9a7f1a42d06ddbac]::ty::query::QueryEngine>::analysis
  60:        0x10d34d608 - <rustc_interface[68ba7ba60dcf80eb]::passes::QueryContext>::enter::<rustc_driver[b67fef72c303079b]::run_compiler::{closure#1}::{closure#2}::{closure#2}, core[cead920de05078ba]::result::Result<(), rustc_errors[fe326c1ebc0a7364]::ErrorGuaranteed>>
  61:        0x10d39e724 - <rustc_interface[68ba7ba60dcf80eb]::queries::QueryResult<rustc_interface[68ba7ba60dcf80eb]::passes::QueryContext>>::enter::<core[cead920de05078ba]::result::Result<(), rustc_errors[fe326c1ebc0a7364]::ErrorGuaranteed>, rustc_driver[b67fef72c303079b]::run_compiler::{closure#1}::{closure#2}::{closure#2}>
  62:        0x10d385090 - <rustc_interface[68ba7ba60dcf80eb]::interface::Compiler>::enter::<rustc_driver[b67fef72c303079b]::run_compiler::{closure#1}::{closure#2}, core[cead920de05078ba]::result::Result<core[cead920de05078ba]::option::Option<rustc_interface[68ba7ba60dcf80eb]::queries::Linker>, rustc_errors[fe326c1ebc0a7364]::ErrorGuaranteed>>
  63:        0x10d39dedc - rustc_span[cd726bea196c4eb]::with_source_map::<core[cead920de05078ba]::result::Result<(), rustc_errors[fe326c1ebc0a7364]::ErrorGuaranteed>, rustc_interface[68ba7ba60dcf80eb]::interface::run_compiler<core[cead920de05078ba]::result::Result<(), rustc_errors[fe326c1ebc0a7364]::ErrorGuaranteed>, rustc_driver[b67fef72c303079b]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  64:        0x10d35332c - std[8dc9805012fd1cea]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[68ba7ba60dcf80eb]::util::run_in_thread_pool_with_globals<rustc_interface[68ba7ba60dcf80eb]::interface::run_compiler<core[cead920de05078ba]::result::Result<(), rustc_errors[fe326c1ebc0a7364]::ErrorGuaranteed>, rustc_driver[b67fef72c303079b]::run_compiler::{closure#1}>::{closure#0}, core[cead920de05078ba]::result::Result<(), rustc_errors[fe326c1ebc0a7364]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[cead920de05078ba]::result::Result<(), rustc_errors[fe326c1ebc0a7364]::ErrorGuaranteed>>
  65:        0x10d335f68 - <<std[8dc9805012fd1cea]::thread::Builder>::spawn_unchecked_<rustc_interface[68ba7ba60dcf80eb]::util::run_in_thread_pool_with_globals<rustc_interface[68ba7ba60dcf80eb]::interface::run_compiler<core[cead920de05078ba]::result::Result<(), rustc_errors[fe326c1ebc0a7364]::ErrorGuaranteed>, rustc_driver[b67fef72c303079b]::run_compiler::{closure#1}>::{closure#0}, core[cead920de05078ba]::result::Result<(), rustc_errors[fe326c1ebc0a7364]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[cead920de05078ba]::result::Result<(), rustc_errors[fe326c1ebc0a7364]::ErrorGuaranteed>>::{closure#1} as core[cead920de05078ba]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  66:        0x1050d1e18 - std::sys::unix::thread::Thread::new::thread_start::h7c145656763309f3
  67:        0x19441e06c - __pthread_deallocate

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.68.2 (9eb3afe9e 2023-03-27) running on aarch64-apple-darwin

note: compiler flags: --crate-type lib -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C incremental=[REDACTED]

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

query stack during panic:
#0 [typeck] type-checking `model::iterate_surfaces`
#1 [typeck_item_bodies] type-checking all item bodies
#2 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `heat`

Backtrace

RUST_BACKTRACE=1 cargo check --features parallel 2> error.out.txt

Backtrace

    Checking heat v1.0.0 (/Users/germolinal/Desktop/heat)
error: internal compiler error: compiler/rustc_infer/src/infer/region_constraints/mod.rs:568:17: cannot relate bound region: ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:473 ~ heat[9e0d]::model::iterate_surfaces::'_), '_) }) <= '_#22r

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0/compiler/rustc_errors/src/lib.rs:987:33
stack backtrace:
   0: std::panicking::begin_panic::<rustc_errors::ExplicitBug>
   1: std::panic::panic_any::<rustc_errors::ExplicitBug>
   2: <rustc_errors::HandlerInner>::span_bug::<rustc_span::span_encoding::Span, &alloc::string::String>
   3: <rustc_errors::Handler>::span_bug::<rustc_span::span_encoding::Span, &alloc::string::String>
   4: rustc_middle::util::bug::opt_span_bug_fmt::<rustc_span::span_encoding::Span>::{closure#0}
   5: rustc_middle::ty::context::tls::with_opt::<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}
   6: rustc_middle::ty::context::tls::with_context_opt::<rustc_middle::ty::context::tls::with_opt<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
   7: rustc_middle::util::bug::opt_span_bug_fmt::<rustc_span::span_encoding::Span>
   8: rustc_middle::util::bug::span_bug_fmt::<rustc_span::span_encoding::Span>
   9: <rustc_infer::infer::region_constraints::RegionConstraintCollector>::make_subregion
  10: <rustc_infer::infer::region_constraints::RegionConstraintCollector>::make_eqregion
  11: <rustc_infer::infer::equate::Equate as rustc_middle::ty::relate::TypeRelation>::regions
  12: rustc_middle::ty::relate::super_relate_tys::<rustc_infer::infer::equate::Equate>
  13: <rustc_infer::infer::equate::Equate as rustc_middle::ty::relate::TypeRelation>::tys
  14: <core::result::Result<rustc_middle::ty::Ty, rustc_middle::ty::error::TypeError> as rustc_type_ir::InternIteratorElement<rustc_middle::ty::Ty, rustc_middle::ty::Ty>>::intern_with::<core::iter::adapters::map::Map<core::iter::adapters::zip::Zip<core::iter::adapters::copied::Copied<core::slice::iter::Iter<rustc_middle::ty::Ty>>, core::iter::adapters::copied::Copied<core::slice::iter::Iter<rustc_middle::ty::Ty>>>, rustc_middle::ty::relate::super_relate_tys<rustc_infer::infer::equate::Equate>::{closure#2}>, <rustc_middle::ty::context::TyCtxt>::mk_tup<core::iter::adapters::map::Map<core::iter::adapters::zip::Zip<core::iter::adapters::copied::Copied<core::slice::iter::Iter<rustc_middle::ty::Ty>>, core::iter::adapters::copied::Copied<core::slice::iter::Iter<rustc_middle::ty::Ty>>>, rustc_middle::ty::relate::super_relate_tys<rustc_infer::infer::equate::Equate>::{closure#2}>>::{closure#0}>
  15: rustc_middle::ty::relate::super_relate_tys::<rustc_infer::infer::equate::Equate>
  16: <rustc_infer::infer::equate::Equate as rustc_middle::ty::relate::TypeRelation>::tys
  17: <rustc_infer::infer::InferCtxt>::commit_if_ok::<rustc_infer::infer::InferOk<()>, rustc_middle::ty::error::TypeError, <rustc_infer::infer::at::Trace>::eq<rustc_middle::ty::Ty>::{closure#0}>
  18: <rustc_infer::infer::InferCtxt>::can_eq::<rustc_middle::ty::Ty>
  19: rustc_trait_selection::traits::error_reporting::suggestions::hint_missing_borrow
  20: <rustc_infer::infer::error_reporting::TypeErrCtxt as rustc_trait_selection::traits::error_reporting::suggestions::TypeErrCtxtExt>::report_closure_arg_mismatch
  21: <rustc_infer::infer::error_reporting::TypeErrCtxt as rustc_trait_selection::traits::error_reporting::TypeErrCtxtExt>::report_selection_error
  22: <rustc_infer::infer::error_reporting::TypeErrCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtPrivExt>::report_fulfillment_error
  23: <rustc_infer::infer::error_reporting::TypeErrCtxt as rustc_trait_selection::traits::error_reporting::TypeErrCtxtExt>::report_fulfillment_errors
  24: <rustc_hir_typeck::fn_ctxt::FnCtxt>::resolve_vars_with_obligations
  25: <rustc_hir_typeck::fn_ctxt::FnCtxt>::demand_coerce_diag
  26: <rustc_hir_typeck::fn_ctxt::FnCtxt>::demand_coerce
  27: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_decl
  28: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_stmt
  29: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_block_with_expected
  30: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
  31: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  32: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_return_expr
  33: rustc_hir_typeck::check::check_fn
  34: rustc_hir_typeck::typeck
  35: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId, &rustc_middle::ty::typeck_results::TypeckResults>
  36: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::queries::typeck, rustc_query_impl::plumbing::QueryCtxt>
  37: rustc_query_system::query::plumbing::force_query::<rustc_query_impl::queries::typeck, rustc_query_impl::plumbing::QueryCtxt, rustc_middle::dep_graph::dep_node::DepKind>
  38: rustc_query_impl::plumbing::force_from_dep_node::<rustc_query_impl::queries::typeck>
  39: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
  40: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_green::<rustc_query_impl::plumbing::QueryCtxt>
  41: rustc_query_system::query::plumbing::try_load_from_disk_and_cache_in_memory::<rustc_query_impl::queries::typeck_item_bodies, rustc_query_impl::plumbing::QueryCtxt>
  42: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::queries::typeck_item_bodies, rustc_query_impl::plumbing::QueryCtxt>
  43: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::typeck_item_bodies
  44: <rustc_session::session::Session>::time::<(), rustc_hir_analysis::check_crate::{closure#7}>
  45: rustc_hir_analysis::check_crate
  46: rustc_interface::passes::analysis
  47: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), core::result::Result<(), rustc_errors::ErrorGuaranteed>>
  48: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::queries::analysis, rustc_query_impl::plumbing::QueryCtxt>
  49: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
  50: <rustc_interface::passes::QueryContext>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}::{closure#2}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
  51: <rustc_interface::queries::QueryResult<rustc_interface::passes::QueryContext>>::enter::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}::{closure#2}::{closure#2}>
  52: <rustc_interface::interface::Compiler>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_errors::ErrorGuaranteed>>
  53: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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.68.2 (9eb3afe9e 2023-03-27) running on aarch64-apple-darwin

note: compiler flags: --crate-type lib -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C incremental=[REDACTED]

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

query stack during panic:
#0 [typeck] type-checking `model::iterate_surfaces`
#1 [typeck_item_bodies] type-checking all item bodies
#2 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `heat`

@germolinal germolinal 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 Apr 9, 2023
@jyn514
Copy link
Member

jyn514 commented Apr 10, 2023

Duplicate of #109361

@jyn514 jyn514 marked this as a duplicate of #109361 Apr 10, 2023
@jyn514 jyn514 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 10, 2023
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

No branches or pull requests

2 participants