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

Incremental compilation ICE "forcing query with already existing DepNode …" using ouroboros #106136

Open
steffahn opened this issue Dec 25, 2022 · 3 comments · May be fixed by #109050
Open

Incremental compilation ICE "forcing query with already existing DepNode …" using ouroboros #106136

steffahn opened this issue Dec 25, 2022 · 3 comments · May be fixed by #109050
Labels
A-incr-comp Area: Incremental compilation 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 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

@steffahn
Copy link
Member

steffahn commented Dec 25, 2022

Reproduces on this change

/*
[dependencies]
ouroboros = "0.15.5"
*/
use ouroboros::*;

type F<'a> = fn(&'a ());

#[self_referencing]
struct S<'a> {
    o: Box<F<'a>>,
    #[borrows(o)]
-   r: &'this u8,
+   r: &'this str,
}
fn main() {
    println!("");
}

try it out online here

   Compiling playground v0.1.0 (/home/explorer/playground)
thread 'rustc' panicked at 'forcing query with already existing `DepNode`
- query-key: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }], value: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [Binder(TraitPredicate(<RBuilder_ as std::marker::Sized>, polarity:Positive), []), Binder(TraitPredicate(<RBuilder_ as std::ops::FnOnce<(&'this std::boxed::Box<fn(&'a ())>,)>>, polarity:Positive), [Region(BrNamed(DefId(0:36 ~ playground[0a24]::ouroboros_impl_s::{impl#1}::'this), 'this))]), Binder(ProjectionPredicate(AliasTy { substs: [RBuilder_, (&'this std::boxed::Box<fn(&'a ())>,)], def_id: DefId(2:2924 ~ core[0486]::ops::function::FnOnce::Output), _use_mk_alias_ty_instead: () }, Term::Ty(std::pin::Pin<std::boxed::Box<(dyn std::future::Future<Output = &'this str> + 'this)>>)), [Region(BrNamed(DefId(0:36 ~ playground[0a24]::ouroboros_impl_s::{impl#1}::'this), 'this))])], reveal: UserFacing, constness: NotConst }, value: Normalize { value: [async fn body@src/main.rs:9:1: 9:20] } } }
- dep-node: type_op_normalize_ty(564da9a8061554a1-b3a54dc468e93f1e)', /rustc/0468a00ae3fd6ef1a6a0f9eaf637d7aa9e604acc/compiler/rustc_query_system/src/dep_graph/graph.rs:316:9
stack backtrace:
   0:     0x7f976138e85a - std::backtrace_rs::backtrace::libunwind::trace::h51cb40f2f8f23f31
                               at /rustc/0468a00ae3fd6ef1a6a0f9eaf637d7aa9e604acc/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f976138e85a - std::backtrace_rs::backtrace::trace_unsynchronized::hebc3338ffed58a56
                               at /rustc/0468a00ae3fd6ef1a6a0f9eaf637d7aa9e604acc/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f976138e85a - std::sys_common::backtrace::_print_fmt::h136f982a4680ac7f
                               at /rustc/0468a00ae3fd6ef1a6a0f9eaf637d7aa9e604acc/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f976138e85a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hd1514baae6e42eb6
                               at /rustc/0468a00ae3fd6ef1a6a0f9eaf637d7aa9e604acc/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f97613f136e - core::fmt::write::hfbed4b54a5eebfee
                               at /rustc/0468a00ae3fd6ef1a6a0f9eaf637d7aa9e604acc/library/core/src/fmt/mod.rs:1208:17
   5:     0x7f976137ebd5 - std::io::Write::write_fmt::h9f6098b6a54a9a94
                               at /rustc/0468a00ae3fd6ef1a6a0f9eaf637d7aa9e604acc/library/std/src/io/mod.rs:1682:15
   6:     0x7f976138e625 - std::sys_common::backtrace::_print::h6e7a2bc7da6ecf73
                               at /rustc/0468a00ae3fd6ef1a6a0f9eaf637d7aa9e604acc/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f976138e625 - std::sys_common::backtrace::print::h631b25ef82a0eea1
                               at /rustc/0468a00ae3fd6ef1a6a0f9eaf637d7aa9e604acc/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f976139136f - std::panicking::default_hook::{{closure}}::h41299fc951b157c9
                               at /rustc/0468a00ae3fd6ef1a6a0f9eaf637d7aa9e604acc/library/std/src/panicking.rs:267:22
   9:     0x7f97613910ab - std::panicking::default_hook::hd317023abfdceaed
                               at /rustc/0468a00ae3fd6ef1a6a0f9eaf637d7aa9e604acc/library/std/src/panicking.rs:286:9
  10:     0x7f976465dcc1 - rustc_driver[8fc339cf4408bec4]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f9761391bad - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h813f31c5cc72640d
                               at /rustc/0468a00ae3fd6ef1a6a0f9eaf637d7aa9e604acc/library/alloc/src/boxed.rs:2032:9
  12:     0x7f9761391bad - std::panicking::rust_panic_with_hook::h2e61684db9120e8e
                               at /rustc/0468a00ae3fd6ef1a6a0f9eaf637d7aa9e604acc/library/std/src/panicking.rs:692:13
  13:     0x7f9761391929 - std::panicking::begin_panic_handler::{{closure}}::h63d39cc19c97d34a
                               at /rustc/0468a00ae3fd6ef1a6a0f9eaf637d7aa9e604acc/library/std/src/panicking.rs:579:13
  14:     0x7f976138ed0c - std::sys_common::backtrace::__rust_end_short_backtrace::h8da6b271e1c3c543
                               at /rustc/0468a00ae3fd6ef1a6a0f9eaf637d7aa9e604acc/library/std/src/sys_common/backtrace.rs:137:18
  15:     0x7f9761391632 - rust_begin_unwind
                               at /rustc/0468a00ae3fd6ef1a6a0f9eaf637d7aa9e604acc/library/std/src/panicking.rs:575:5
  16:     0x7f97613edd53 - core::panicking::panic_fmt::h89c37196e57a859c
                               at /rustc/0468a00ae3fd6ef1a6a0f9eaf637d7aa9e604acc/library/core/src/panicking.rs:64:14
  17:     0x7f97639bc3a1 - <rustc_query_system[259206d12eac588b]::dep_graph::graph::DepGraph<rustc_middle[1a40b9d11a76de60]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[1a40b9d11a76de60]::ty::context::TyCtxt, rustc_middle[1a40b9d11a76de60]::infer::canonical::Canonical<rustc_middle[1a40b9d11a76de60]::ty::ParamEnvAnd<rustc_middle[1a40b9d11a76de60]::traits::query::type_op::Normalize<rustc_middle[1a40b9d11a76de60]::ty::Ty>>>, core[486592e7c49a8aa]::result::Result<&rustc_middle[1a40b9d11a76de60]::infer::canonical::Canonical<rustc_middle[1a40b9d11a76de60]::infer::canonical::QueryResponse<rustc_middle[1a40b9d11a76de60]::ty::Ty>>, rustc_middle[1a40b9d11a76de60]::traits::query::NoSolution>>
  18:     0x7f97639baa59 - rustc_query_system[259206d12eac588b]::query::plumbing::try_execute_query::<rustc_query_impl[bc8faa08c5c89942]::plumbing::QueryCtxt, rustc_query_system[259206d12eac588b]::query::caches::DefaultCache<rustc_middle[1a40b9d11a76de60]::infer::canonical::Canonical<rustc_middle[1a40b9d11a76de60]::ty::ParamEnvAnd<rustc_middle[1a40b9d11a76de60]::traits::query::type_op::Normalize<rustc_middle[1a40b9d11a76de60]::ty::Ty>>>, core[486592e7c49a8aa]::result::Result<&rustc_middle[1a40b9d11a76de60]::infer::canonical::Canonical<rustc_middle[1a40b9d11a76de60]::infer::canonical::QueryResponse<rustc_middle[1a40b9d11a76de60]::ty::Ty>>, rustc_middle[1a40b9d11a76de60]::traits::query::NoSolution>>>
  19:     0x7f97639ba1cd - rustc_query_system[259206d12eac588b]::query::plumbing::get_query::<rustc_query_impl[bc8faa08c5c89942]::queries::type_op_normalize_ty, rustc_query_impl[bc8faa08c5c89942]::plumbing::QueryCtxt>
  20:     0x7f97639ba113 - <rustc_query_impl[bc8faa08c5c89942]::Queries as rustc_middle[1a40b9d11a76de60]::ty::query::QueryEngine>::type_op_normalize_ty
  21:     0x7f976331abb3 - <rustc_middle[1a40b9d11a76de60]::ty::ParamEnvAnd<rustc_middle[1a40b9d11a76de60]::traits::query::type_op::Normalize<rustc_middle[1a40b9d11a76de60]::ty::Ty>> as rustc_trait_selection[e881d80e291c2cd6]::traits::query::type_op::TypeOp>::fully_perform
  22:     0x7f97632a6630 - <&mut <rustc_borrowck[c86664c7788b1f3c]::type_check::free_region_relations::UniversalRegionRelationsBuilder>::create::{closure#0} as core[486592e7c49a8aa]::ops::function::FnOnce<(rustc_middle[1a40b9d11a76de60]::ty::Ty,)>>::call_once
  23:     0x7f97632a5f32 - <alloc[1a97d1c4ba9fe4a2]::vec::Vec<&rustc_middle[1a40b9d11a76de60]::infer::canonical::QueryRegionConstraints> as alloc[1a97d1c4ba9fe4a2]::vec::spec_from_iter::SpecFromIter<&rustc_middle[1a40b9d11a76de60]::infer::canonical::QueryRegionConstraints, core[486592e7c49a8aa]::iter::adapters::flatten::FlatMap<core[486592e7c49a8aa]::iter::adapters::chain::Chain<core[486592e7c49a8aa]::iter::adapters::cloned::Cloned<core[486592e7c49a8aa]::slice::iter::Iter<rustc_middle[1a40b9d11a76de60]::ty::Ty>>, core[486592e7c49a8aa]::option::IntoIter<rustc_middle[1a40b9d11a76de60]::ty::Ty>>, core[486592e7c49a8aa]::iter::adapters::chain::Chain<core[486592e7c49a8aa]::iter::adapters::chain::Chain<core[486592e7c49a8aa]::option::IntoIter<&rustc_middle[1a40b9d11a76de60]::infer::canonical::QueryRegionConstraints>, core[486592e7c49a8aa]::option::IntoIter<&rustc_middle[1a40b9d11a76de60]::infer::canonical::QueryRegionConstraints>>, core[486592e7c49a8aa]::option::IntoIter<&rustc_middle[1a40b9d11a76de60]::infer::canonical::QueryRegionConstraints>>, <rustc_borrowck[c86664c7788b1f3c]::type_check::free_region_relations::UniversalRegionRelationsBuilder>::create::{closure#0}>>>::from_iter
  24:     0x7f97632a12a4 - rustc_borrowck[c86664c7788b1f3c]::type_check::free_region_relations::create
  25:     0x7f9763295910 - rustc_borrowck[c86664c7788b1f3c]::type_check::type_check
  26:     0x7f9763266a35 - rustc_borrowck[c86664c7788b1f3c]::nll::compute_regions
  27:     0x7f976324b3ac - rustc_borrowck[c86664c7788b1f3c]::do_mir_borrowck
  28:     0x7f9763236c69 - rustc_borrowck[c86664c7788b1f3c]::mir_borrowck
  29:     0x7f9763236145 - <rustc_borrowck[c86664c7788b1f3c]::provide::{closure#0} as core[486592e7c49a8aa]::ops::function::FnOnce<(rustc_middle[1a40b9d11a76de60]::ty::context::TyCtxt, rustc_span[fd000e025c1fef5b]::def_id::LocalDefId)>>::call_once
  30:     0x7f976363c564 - <rustc_query_system[259206d12eac588b]::dep_graph::graph::DepGraph<rustc_middle[1a40b9d11a76de60]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[1a40b9d11a76de60]::ty::context::TyCtxt, rustc_span[fd000e025c1fef5b]::def_id::LocalDefId, &rustc_middle[1a40b9d11a76de60]::mir::query::BorrowCheckResult>
  31:     0x7f976363b32c - rustc_query_system[259206d12eac588b]::query::plumbing::try_execute_query::<rustc_query_impl[bc8faa08c5c89942]::plumbing::QueryCtxt, rustc_query_system[259206d12eac588b]::query::caches::VecCache<rustc_span[fd000e025c1fef5b]::def_id::LocalDefId, &rustc_middle[1a40b9d11a76de60]::mir::query::BorrowCheckResult>>
  32:     0x7f976400cf8a - <rustc_query_impl[bc8faa08c5c89942]::Queries as rustc_middle[1a40b9d11a76de60]::ty::query::QueryEngine>::mir_borrowck
  33:     0x7f9763327d21 - <rustc_borrowck[c86664c7788b1f3c]::type_check::TypeChecker>::prove_closure_bounds
  34:     0x7f9763306fc5 - <rustc_borrowck[c86664c7788b1f3c]::type_check::TypeChecker>::typeck_mir
  35:     0x7f9763295c76 - rustc_borrowck[c86664c7788b1f3c]::type_check::type_check
  36:     0x7f9763266a35 - rustc_borrowck[c86664c7788b1f3c]::nll::compute_regions
  37:     0x7f976324b3ac - rustc_borrowck[c86664c7788b1f3c]::do_mir_borrowck
  38:     0x7f9763236c69 - rustc_borrowck[c86664c7788b1f3c]::mir_borrowck
  39:     0x7f9763236145 - <rustc_borrowck[c86664c7788b1f3c]::provide::{closure#0} as core[486592e7c49a8aa]::ops::function::FnOnce<(rustc_middle[1a40b9d11a76de60]::ty::context::TyCtxt, rustc_span[fd000e025c1fef5b]::def_id::LocalDefId)>>::call_once
  40:     0x7f976363c564 - <rustc_query_system[259206d12eac588b]::dep_graph::graph::DepGraph<rustc_middle[1a40b9d11a76de60]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[1a40b9d11a76de60]::ty::context::TyCtxt, rustc_span[fd000e025c1fef5b]::def_id::LocalDefId, &rustc_middle[1a40b9d11a76de60]::mir::query::BorrowCheckResult>
  41:     0x7f976363b32c - rustc_query_system[259206d12eac588b]::query::plumbing::try_execute_query::<rustc_query_impl[bc8faa08c5c89942]::plumbing::QueryCtxt, rustc_query_system[259206d12eac588b]::query::caches::VecCache<rustc_span[fd000e025c1fef5b]::def_id::LocalDefId, &rustc_middle[1a40b9d11a76de60]::mir::query::BorrowCheckResult>>
  42:     0x7f9764e2ce86 - rustc_query_system[259206d12eac588b]::query::plumbing::force_query::<rustc_query_impl[bc8faa08c5c89942]::queries::mir_borrowck, rustc_query_impl[bc8faa08c5c89942]::plumbing::QueryCtxt>
  43:     0x7f9764f9a1a1 - rustc_query_impl[bc8faa08c5c89942]::plumbing::force_from_dep_node::<rustc_query_impl[bc8faa08c5c89942]::queries::mir_borrowck>
  44:     0x7f97626fb819 - <rustc_query_system[259206d12eac588b]::dep_graph::graph::DepGraph<rustc_middle[1a40b9d11a76de60]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[bc8faa08c5c89942]::plumbing::QueryCtxt>
  45:     0x7f9762f1cba9 - rustc_query_system[259206d12eac588b]::query::plumbing::get_query::<rustc_query_impl[bc8faa08c5c89942]::queries::type_of, rustc_query_impl[bc8faa08c5c89942]::plumbing::QueryCtxt>
  46:     0x7f976373e460 - rustc_hir_analysis[1b7141b29bd2e9d]::check::check::check_mod_item_types
  47:     0x7f97631d7ff4 - <rustc_query_system[259206d12eac588b]::dep_graph::graph::DepGraph<rustc_middle[1a40b9d11a76de60]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[1a40b9d11a76de60]::ty::context::TyCtxt, rustc_span[fd000e025c1fef5b]::def_id::LocalDefId, ()>
  48:     0x7f97631d618e - rustc_query_system[259206d12eac588b]::query::plumbing::try_execute_query::<rustc_query_impl[bc8faa08c5c89942]::plumbing::QueryCtxt, rustc_query_system[259206d12eac588b]::query::caches::VecCache<rustc_span[fd000e025c1fef5b]::def_id::LocalDefId, ()>>
  49:     0x7f9763a4f403 - rustc_query_system[259206d12eac588b]::query::plumbing::get_query::<rustc_query_impl[bc8faa08c5c89942]::queries::check_mod_item_types, rustc_query_impl[bc8faa08c5c89942]::plumbing::QueryCtxt>
  50:     0x7f9763cf8a55 - <rustc_middle[1a40b9d11a76de60]::hir::map::Map>::for_each_module::<rustc_hir_analysis[1b7141b29bd2e9d]::check_crate::{closure#6}::{closure#0}>
  51:     0x7f9762bde292 - rustc_hir_analysis[1b7141b29bd2e9d]::check_crate
  52:     0x7f9762bddedb - rustc_interface[58e4822cc60d2a6c]::passes::analysis
  53:     0x7f9763e21e85 - <rustc_query_system[259206d12eac588b]::dep_graph::graph::DepGraph<rustc_middle[1a40b9d11a76de60]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[1a40b9d11a76de60]::ty::context::TyCtxt, (), core[486592e7c49a8aa]::result::Result<(), rustc_errors[5442e185e098f882]::ErrorGuaranteed>>
  54:     0x7f9763e21048 - rustc_query_system[259206d12eac588b]::query::plumbing::try_execute_query::<rustc_query_impl[bc8faa08c5c89942]::plumbing::QueryCtxt, rustc_query_system[259206d12eac588b]::query::caches::DefaultCache<(), core[486592e7c49a8aa]::result::Result<(), rustc_errors[5442e185e098f882]::ErrorGuaranteed>>>
  55:     0x7f9763e20ab0 - rustc_query_system[259206d12eac588b]::query::plumbing::get_query::<rustc_query_impl[bc8faa08c5c89942]::queries::analysis, rustc_query_impl[bc8faa08c5c89942]::plumbing::QueryCtxt>
  56:     0x7f97638ee4f3 - <rustc_interface[58e4822cc60d2a6c]::passes::QueryContext>::enter::<rustc_driver[8fc339cf4408bec4]::run_compiler::{closure#1}::{closure#2}::{closure#2}, core[486592e7c49a8aa]::result::Result<(), rustc_errors[5442e185e098f882]::ErrorGuaranteed>>
  57:     0x7f97638ea8a3 - <rustc_interface[58e4822cc60d2a6c]::interface::Compiler>::enter::<rustc_driver[8fc339cf4408bec4]::run_compiler::{closure#1}::{closure#2}, core[486592e7c49a8aa]::result::Result<core[486592e7c49a8aa]::option::Option<rustc_interface[58e4822cc60d2a6c]::queries::Linker>, rustc_errors[5442e185e098f882]::ErrorGuaranteed>>
  58:     0x7f97638e58b8 - rustc_span[fd000e025c1fef5b]::with_source_map::<core[486592e7c49a8aa]::result::Result<(), rustc_errors[5442e185e098f882]::ErrorGuaranteed>, rustc_interface[58e4822cc60d2a6c]::interface::run_compiler<core[486592e7c49a8aa]::result::Result<(), rustc_errors[5442e185e098f882]::ErrorGuaranteed>, rustc_driver[8fc339cf4408bec4]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  59:     0x7f97638e53a5 - <scoped_tls[2f862aa259e87453]::ScopedKey<rustc_span[fd000e025c1fef5b]::SessionGlobals>>::set::<rustc_interface[58e4822cc60d2a6c]::interface::run_compiler<core[486592e7c49a8aa]::result::Result<(), rustc_errors[5442e185e098f882]::ErrorGuaranteed>, rustc_driver[8fc339cf4408bec4]::run_compiler::{closure#1}>::{closure#0}, core[486592e7c49a8aa]::result::Result<(), rustc_errors[5442e185e098f882]::ErrorGuaranteed>>
  60:     0x7f97638e4992 - std[14b7645e29e8dad4]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[58e4822cc60d2a6c]::util::run_in_thread_pool_with_globals<rustc_interface[58e4822cc60d2a6c]::interface::run_compiler<core[486592e7c49a8aa]::result::Result<(), rustc_errors[5442e185e098f882]::ErrorGuaranteed>, rustc_driver[8fc339cf4408bec4]::run_compiler::{closure#1}>::{closure#0}, core[486592e7c49a8aa]::result::Result<(), rustc_errors[5442e185e098f882]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[486592e7c49a8aa]::result::Result<(), rustc_errors[5442e185e098f882]::ErrorGuaranteed>>
  61:     0x7f9763f1bc1a - <<std[14b7645e29e8dad4]::thread::Builder>::spawn_unchecked_<rustc_interface[58e4822cc60d2a6c]::util::run_in_thread_pool_with_globals<rustc_interface[58e4822cc60d2a6c]::interface::run_compiler<core[486592e7c49a8aa]::result::Result<(), rustc_errors[5442e185e098f882]::ErrorGuaranteed>, rustc_driver[8fc339cf4408bec4]::run_compiler::{closure#1}>::{closure#0}, core[486592e7c49a8aa]::result::Result<(), rustc_errors[5442e185e098f882]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[486592e7c49a8aa]::result::Result<(), rustc_errors[5442e185e098f882]::ErrorGuaranteed>>::{closure#1} as core[486592e7c49a8aa]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  62:     0x7f976139b983 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hdbff13d45d6b3b01
                               at /rustc/0468a00ae3fd6ef1a6a0f9eaf637d7aa9e604acc/library/alloc/src/boxed.rs:2000:9
  63:     0x7f976139b983 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h1e5384a2b7a0037a
                               at /rustc/0468a00ae3fd6ef1a6a0f9eaf637d7aa9e604acc/library/alloc/src/boxed.rs:2000:9
  64:     0x7f976139b983 - std::sys::unix::thread::Thread::new::thread_start::h4b8540c4f94d9763
                               at /rustc/0468a00ae3fd6ef1a6a0f9eaf637d7aa9e604acc/library/std/src/sys/unix/thread.rs:108:17
  65:     0x7f976125cea7 - start_thread
  66:     0x7f976117aa2f - clone
  67:                0x0 - <unknown>

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.68.0-nightly (0468a00ae 2022-12-17) running on x86_64-unknown-linux-gnu

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

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

query stack during panic:
#0 [type_op_normalize_ty] normalizing `[async fn body@src/main.rs:9:1: 9:20]`
#1 [mir_borrowck] borrow-checking `ouroboros_impl_s::<impl at src/main.rs:9:1: 9:20>::build::{closure#0}`
#2 [mir_borrowck] borrow-checking `ouroboros_impl_s::<impl at src/main.rs:9:1: 9:20>::build`
#3 [type_of] computing type of `ouroboros_impl_s::<impl at src/main.rs:9:1: 9:20>::build::{opaque#0}`
#4 [check_mod_item_types] checking item types in module `ouroboros_impl_s`
#5 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `playground`

Searching the error on open issues only shows this issue, but I’m not sure whether consts are involved here, too. Ouroboros does generate quite some code… someone (maybe me myself at a later date) would need to expand the macro and search for the relevant bit that causes the ICE. I.e. @rustbot label E-needs-mcve. With a reduced example, we can better judge if this could be a duplicate, and we could also more easily check whether this is a regression, and if yes, where/when.

@rustbot label A-incr-comp

@steffahn steffahn 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 Dec 25, 2022
@rustbot rustbot added E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example A-incr-comp Area: Incremental compilation labels Dec 25, 2022
@compiler-errors compiler-errors self-assigned this Jan 7, 2023
@compiler-errors
Copy link
Member

compiler-errors commented Jan 7, 2023

This regressed in #103171. Unfortunately, it doesn't seem like #104282 fixed this. :/

edit: actually I have no idea how to fix this.

@compiler-errors compiler-errors removed their assignment Jan 7, 2023
@megakorre
Copy link
Contributor

megakorre commented Feb 17, 2023

I tried to make a MCVE for this. I managed to remove the dependency but the code is not that minimal.
I could not get the same code to fail without the macro. And it does not ICE when you just change the argument to output! (maybe it has to be a proc macro. will try that).

template.rs

type F<'a> = fn(&'a ());
macro_rules! output {
    ($t: ty) => {
        struct S<'a> {
            r: &'a VARIABLE,
            o: Box<F<'a>>,
        }

        struct SAsyncSendTryBuilder<
            'a,
            RBuilder_: for<'this> ::core::ops::FnOnce(
                &'this Box<F<'a>>,
            ) -> ::core::pin::Pin<
                Box<
                    dyn ::core::future::Future<
                            Output = ::core::result::Result<&'this VARIABLE, Error_>,
                        > + ::core::marker::Send
                        + 'this,
                >,
            >,
            Error_,
        > {
            o: Box<F<'a>>,
            r_builder: RBuilder_,
        }
        impl<
                'a,
                RBuilder_: for<'this> ::core::ops::FnOnce(
                    &'this Box<F<'a>>,
                ) -> ::core::pin::Pin<
                    Box<
                        dyn ::core::future::Future<
                                Output = ::core::result::Result<&'this VARIABLE, Error_>,
                            > + ::core::marker::Send
                            + 'this,
                    >,
                >,
                Error_,
            > SAsyncSendTryBuilder<'a, RBuilder_, Error_>
        {
            async fn try_build_or_recover(
                self,
            ) -> ::core::result::Result<S<'a>, (Error_, Heads<'a>)> {
                S::try_new_or_recover_async_send(self.o, self.r_builder).await
            }
        }
        struct Heads<'a> {
            o: Box<F<'a>>,
            _consume_template_lifetime_a: ::core::marker::PhantomData<&'a ()>,
        }
        impl<'a> S<'a> {
            async fn try_new_or_recover_async_send<Error_>(
                o: Box<F<'a>>,
                r_builder: impl for<'this> ::core::ops::FnOnce(
                    &'this Box<F<'a>>,
                ) -> ::core::pin::Pin<
                    Box<
                        dyn ::core::future::Future<
                                Output = ::core::result::Result<&'this VARIABLE, Error_>,
                            > + ::core::marker::Send
                            + 'this,
                    >,
                >,
            ) -> ::core::result::Result<S<'a>, (Error_, Heads<'a>)> {
                todo!()
            }
        }
    };
}

output!(str);
fn main() {}

build_fail.sh

cargo clean
rm src/main.rs
cp template.rs src/main.rs
sed -i 's/VARIABLE/$t/' src/main.rs
cargo build
rm src/main.rs
cp versions/template.rs src/main.rs
sed -i 's/VARIABLE/u8/' src/main.rs
cargo build

This script produces the following ICE.

thread 'rustc' panicked at 'forcing query with already existing `DepNode`
- query-key: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }], value: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [Binder(TraitPredicate(<RBuilder_ as std::marker::Sized>, polarity:Positive), []), Binder(TraitPredicate(<RBuilder_ as std::ops::FnOnce<(&'this std::boxed::Box<fn(&'a ())>,)>>, polarity:Positive), [Region(BrNamed(DefId(0:21 ~ scratch[473e]::{impl#0}::'this), 'this))]), Binder(TraitPredicate(<Error_ as std::marker::Sized>, polarity:Positive), []), Binder(ProjectionPredicate(AliasTy { substs: [RBuilder_, (&'this std::boxed::Box<fn(&'a ())>,)], def_id: DefId(2:2923 ~ core[f0a8]::ops::function::FnOnce::Output) }, Term::Ty(std::pin::Pin<std::boxed::Box<(dyn std::future::Future<Output = std::result::Result<&'this u8, Error_>> + std::marker::Send + 'this)>>)), [Region(BrNamed(DefId(0:21 ~ scratch[473e]::{impl#0}::'this), 'this))])], reveal: UserFacing, constness: NotConst }, value: Normalize { value: [async fn body@src/main.rs:43:69: 45:14] } } }
- dep-node: type_op_normalize_ty(7eb331c2f1b84397-a4e29389866d0526)', /rustc/2d14db321b043ffc579a7461464c88d7e3f54f83/compiler/rustc_query_system/src/dep_graph/graph.rs:316:9
stack backtrace:
   0:     0x7fc90bf6a9ea - std::backtrace_rs::backtrace::libunwind::trace::h3a20221a56d872e6
                               at /rustc/2d14db321b043ffc579a7461464c88d7e3f54f83/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7fc90bf6a9ea - std::backtrace_rs::backtrace::trace_unsynchronized::h23863182fd4b4481
                               at /rustc/2d14db321b043ffc579a7461464c88d7e3f54f83/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fc90bf6a9ea - std::sys_common::backtrace::_print_fmt::hde799c83b2fa8ddb
                               at /rustc/2d14db321b043ffc579a7461464c88d7e3f54f83/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7fc90bf6a9ea - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hb1ed906e28a16738
                               at /rustc/2d14db321b043ffc579a7461464c88d7e3f54f83/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7fc90bfcaafe - core::fmt::write::hee7bc8dd2696f088
                               at /rustc/2d14db321b043ffc579a7461464c88d7e3f54f83/library/core/src/fmt/mod.rs:1232:17
   5:     0x7fc90bf5b005 - std::io::Write::write_fmt::h031e716f6e3d1f66
                               at /rustc/2d14db321b043ffc579a7461464c88d7e3f54f83/library/std/src/io/mod.rs:1684:15
   6:     0x7fc90bf6a7b5 - std::sys_common::backtrace::_print::h8cea91a8dc3abdb3
                               at /rustc/2d14db321b043ffc579a7461464c88d7e3f54f83/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7fc90bf6a7b5 - std::sys_common::backtrace::print::hcd9f90783d8afb1f
                               at /rustc/2d14db321b043ffc579a7461464c88d7e3f54f83/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7fc90bf6d54f - std::panicking::default_hook::{{closure}}::hdf7c561ea2419acd
                               at /rustc/2d14db321b043ffc579a7461464c88d7e3f54f83/library/std/src/panicking.rs:267:22
   9:     0x7fc90bf6d28b - std::panicking::default_hook::h9669759e65745add
                               at /rustc/2d14db321b043ffc579a7461464c88d7e3f54f83/library/std/src/panicking.rs:286:9
  10:     0x7fc90f2b8c44 - <rustc_driver_impl[cf5be2d75a70ff02]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[f0a84df7292b9247]::ops::function::FnOnce<(&core[f0a84df7292b9247]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  11:     0x7fc90bf6dd8a - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h71e54ddf4b01f8ef
                               at /rustc/2d14db321b043ffc579a7461464c88d7e3f54f83/library/alloc/src/boxed.rs:2002:9
  12:     0x7fc90bf6dd8a - std::panicking::rust_panic_with_hook::h96419a4a3670d907
                               at /rustc/2d14db321b043ffc579a7461464c88d7e3f54f83/library/std/src/panicking.rs:692:13
  13:     0x7fc90bf6db09 - std::panicking::begin_panic_handler::{{closure}}::h17c261a3ff4b53aa
                               at /rustc/2d14db321b043ffc579a7461464c88d7e3f54f83/library/std/src/panicking.rs:579:13
  14:     0x7fc90bf6ae8c - std::sys_common::backtrace::__rust_end_short_backtrace::h6f10911888b9e113
                               at /rustc/2d14db321b043ffc579a7461464c88d7e3f54f83/library/std/src/sys_common/backtrace.rs:137:18
  15:     0x7fc90bf6d812 - rust_begin_unwind
                               at /rustc/2d14db321b043ffc579a7461464c88d7e3f54f83/library/std/src/panicking.rs:575:5
  16:     0x7fc90bfc74a3 - core::panicking::panic_fmt::hdb483708f9fb42ab
                               at /rustc/2d14db321b043ffc579a7461464c88d7e3f54f83/library/core/src/panicking.rs:64:14
  17:     0x7fc90e67daa5 - <rustc_query_system[9c20c97984254eda]::dep_graph::graph::DepGraph<rustc_middle[bd03a598433729a4]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[bd03a598433729a4]::ty::context::TyCtxt, rustc_middle[bd03a598433729a4]::infer::canonical::Canonical<rustc_middle[bd03a598433729a4]::ty::ParamEnvAnd<rustc_middle[bd03a598433729a4]::traits::query::type_op::Normalize<rustc_middle[bd03a598433729a4]::ty::Ty>>>, core[f0a84df7292b9247]::result::Result<&rustc_middle[bd03a598433729a4]::infer::canonical::Canonical<rustc_middle[bd03a598433729a4]::infer::canonical::QueryResponse<rustc_middle[bd03a598433729a4]::ty::Ty>>, rustc_middle[bd03a598433729a4]::traits::query::NoSolution>>
  18:     0x7fc90e67cc0d - rustc_query_system[9c20c97984254eda]::query::plumbing::try_execute_query::<rustc_query_impl[e25e6056fa54423]::queries::type_op_normalize_ty, rustc_query_impl[e25e6056fa54423]::plumbing::QueryCtxt>
  19:     0x7fc90ec4bc8e - <rustc_query_impl[e25e6056fa54423]::Queries as rustc_middle[bd03a598433729a4]::ty::query::QueryEngine>::type_op_normalize_ty
  20:     0x7fc90e113eb8 - <rustc_middle[bd03a598433729a4]::ty::ParamEnvAnd<rustc_middle[bd03a598433729a4]::traits::query::type_op::Normalize<rustc_middle[bd03a598433729a4]::ty::Ty>> as rustc_trait_selection[42a1777adec956b8]::traits::query::type_op::TypeOp>::fully_perform
  21:     0x7fc90e0e7f5c - rustc_borrowck[1b2a3a49d27f4d4b]::type_check::free_region_relations::create
  22:     0x7fc90e0b0d63 - rustc_borrowck[1b2a3a49d27f4d4b]::type_check::type_check
  23:     0x7fc90e0a0dca - rustc_borrowck[1b2a3a49d27f4d4b]::nll::compute_regions
  24:     0x7fc90e083ca0 - rustc_borrowck[1b2a3a49d27f4d4b]::do_mir_borrowck
  25:     0x7fc90e06d3bf - rustc_borrowck[1b2a3a49d27f4d4b]::mir_borrowck
  26:     0x7fc90e06ca7b - <rustc_borrowck[1b2a3a49d27f4d4b]::provide::{closure#0} as core[f0a84df7292b9247]::ops::function::FnOnce<(rustc_middle[bd03a598433729a4]::ty::context::TyCtxt, rustc_span[ff2b83d94cd5766c]::def_id::LocalDefId)>>::call_once
  27:     0x7fc90db8f020 - <rustc_query_system[9c20c97984254eda]::dep_graph::graph::DepGraph<rustc_middle[bd03a598433729a4]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[bd03a598433729a4]::ty::context::TyCtxt, rustc_span[ff2b83d94cd5766c]::def_id::LocalDefId, &rustc_middle[bd03a598433729a4]::mir::query::BorrowCheckResult>
  28:     0x7fc90db8de42 - rustc_query_system[9c20c97984254eda]::query::plumbing::try_execute_query::<rustc_query_impl[e25e6056fa54423]::queries::mir_borrowck, rustc_query_impl[e25e6056fa54423]::plumbing::QueryCtxt>
  29:     0x7fc90ec438ed - <rustc_query_impl[e25e6056fa54423]::Queries as rustc_middle[bd03a598433729a4]::ty::query::QueryEngine>::mir_borrowck
  30:     0x7fc90e163861 - <rustc_borrowck[1b2a3a49d27f4d4b]::type_check::TypeChecker>::prove_closure_bounds
  31:     0x7fc90e14247c - <rustc_borrowck[1b2a3a49d27f4d4b]::type_check::TypeChecker>::typeck_mir
  32:     0x7fc90e0b10dc - rustc_borrowck[1b2a3a49d27f4d4b]::type_check::type_check
  33:     0x7fc90e0a0dca - rustc_borrowck[1b2a3a49d27f4d4b]::nll::compute_regions
  34:     0x7fc90e083ca0 - rustc_borrowck[1b2a3a49d27f4d4b]::do_mir_borrowck
  35:     0x7fc90e06d3bf - rustc_borrowck[1b2a3a49d27f4d4b]::mir_borrowck
  36:     0x7fc90e06ca7b - <rustc_borrowck[1b2a3a49d27f4d4b]::provide::{closure#0} as core[f0a84df7292b9247]::ops::function::FnOnce<(rustc_middle[bd03a598433729a4]::ty::context::TyCtxt, rustc_span[ff2b83d94cd5766c]::def_id::LocalDefId)>>::call_once
  37:     0x7fc90db8f020 - <rustc_query_system[9c20c97984254eda]::dep_graph::graph::DepGraph<rustc_middle[bd03a598433729a4]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[bd03a598433729a4]::ty::context::TyCtxt, rustc_span[ff2b83d94cd5766c]::def_id::LocalDefId, &rustc_middle[bd03a598433729a4]::mir::query::BorrowCheckResult>
  38:     0x7fc90db8de42 - rustc_query_system[9c20c97984254eda]::query::plumbing::try_execute_query::<rustc_query_impl[e25e6056fa54423]::queries::mir_borrowck, rustc_query_impl[e25e6056fa54423]::plumbing::QueryCtxt>
  39:     0x7fc90fb52005 - rustc_query_system[9c20c97984254eda]::query::plumbing::force_query::<rustc_query_impl[e25e6056fa54423]::queries::mir_borrowck, rustc_query_impl[e25e6056fa54423]::plumbing::QueryCtxt, rustc_middle[bd03a598433729a4]::dep_graph::dep_node::DepKind>
  40:     0x7fc90fc86361 - rustc_query_impl[e25e6056fa54423]::plumbing::force_from_dep_node::<rustc_query_impl[e25e6056fa54423]::queries::mir_borrowck>
  41:     0x7fc90d40b852 - <rustc_query_system[9c20c97984254eda]::dep_graph::graph::DepGraph<rustc_middle[bd03a598433729a4]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[e25e6056fa54423]::plumbing::QueryCtxt>
  42:     0x7fc90d40b7ed - <rustc_query_system[9c20c97984254eda]::dep_graph::graph::DepGraph<rustc_middle[bd03a598433729a4]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[e25e6056fa54423]::plumbing::QueryCtxt>
  43:     0x7fc90d40b5c1 - <rustc_query_system[9c20c97984254eda]::dep_graph::graph::DepGraph<rustc_middle[bd03a598433729a4]::dep_graph::dep_node::DepKind>>::try_mark_green::<rustc_query_impl[e25e6056fa54423]::plumbing::QueryCtxt>
  44:     0x7fc90e82f86d - rustc_query_system[9c20c97984254eda]::query::plumbing::ensure_must_run::<rustc_query_impl[e25e6056fa54423]::queries::check_mod_item_types, rustc_query_impl[e25e6056fa54423]::plumbing::QueryCtxt>
  45:     0x7fc90ec42df9 - <rustc_query_impl[e25e6056fa54423]::Queries as rustc_middle[bd03a598433729a4]::ty::query::QueryEngine>::check_mod_item_types
  46:     0x7fc90e6f9f21 - <rustc_session[130bf05e2988f5fc]::session::Session>::time::<(), rustc_hir_analysis[7e2943bc0d9db6d0]::check_crate::{closure#6}>
  47:     0x7fc90e6f73fd - rustc_hir_analysis[7e2943bc0d9db6d0]::check_crate
  48:     0x7fc90e6ea9d4 - rustc_interface[e19372daae8a4d61]::passes::analysis
  49:     0x7fc90ea4b57a - <rustc_query_system[9c20c97984254eda]::dep_graph::graph::DepGraph<rustc_middle[bd03a598433729a4]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[bd03a598433729a4]::ty::context::TyCtxt, (), core[f0a84df7292b9247]::result::Result<(), rustc_errors[580ee8295c6eeddb]::ErrorGuaranteed>>
  50:     0x7fc90ea4abe9 - rustc_query_system[9c20c97984254eda]::query::plumbing::try_execute_query::<rustc_query_impl[e25e6056fa54423]::queries::analysis, rustc_query_impl[e25e6056fa54423]::plumbing::QueryCtxt>
  51:     0x7fc90ec3b50a - <rustc_query_impl[e25e6056fa54423]::Queries as rustc_middle[bd03a598433729a4]::ty::query::QueryEngine>::analysis
  52:     0x7fc90e94ce79 - <rustc_middle[bd03a598433729a4]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[cf5be2d75a70ff02]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[f0a84df7292b9247]::result::Result<(), rustc_errors[580ee8295c6eeddb]::ErrorGuaranteed>>
  53:     0x7fc90e4c6a19 - <rustc_interface[e19372daae8a4d61]::interface::Compiler>::enter::<rustc_driver_impl[cf5be2d75a70ff02]::run_compiler::{closure#1}::{closure#2}, core[f0a84df7292b9247]::result::Result<core[f0a84df7292b9247]::option::Option<rustc_interface[e19372daae8a4d61]::queries::Linker>, rustc_errors[580ee8295c6eeddb]::ErrorGuaranteed>>
  54:     0x7fc90e4c4b04 - rustc_span[ff2b83d94cd5766c]::with_source_map::<core[f0a84df7292b9247]::result::Result<(), rustc_errors[580ee8295c6eeddb]::ErrorGuaranteed>, rustc_interface[e19372daae8a4d61]::interface::run_compiler<core[f0a84df7292b9247]::result::Result<(), rustc_errors[580ee8295c6eeddb]::ErrorGuaranteed>, rustc_driver_impl[cf5be2d75a70ff02]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  55:     0x7fc90e4c4614 - <scoped_tls[94748c71a964531c]::ScopedKey<rustc_span[ff2b83d94cd5766c]::SessionGlobals>>::set::<rustc_interface[e19372daae8a4d61]::interface::run_compiler<core[f0a84df7292b9247]::result::Result<(), rustc_errors[580ee8295c6eeddb]::ErrorGuaranteed>, rustc_driver_impl[cf5be2d75a70ff02]::run_compiler::{closure#1}>::{closure#0}, core[f0a84df7292b9247]::result::Result<(), rustc_errors[580ee8295c6eeddb]::ErrorGuaranteed>>
  56:     0x7fc90e4c3d12 - std[f1e96740c585910a]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[e19372daae8a4d61]::util::run_in_thread_pool_with_globals<rustc_interface[e19372daae8a4d61]::interface::run_compiler<core[f0a84df7292b9247]::result::Result<(), rustc_errors[580ee8295c6eeddb]::ErrorGuaranteed>, rustc_driver_impl[cf5be2d75a70ff02]::run_compiler::{closure#1}>::{closure#0}, core[f0a84df7292b9247]::result::Result<(), rustc_errors[580ee8295c6eeddb]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f0a84df7292b9247]::result::Result<(), rustc_errors[580ee8295c6eeddb]::ErrorGuaranteed>>
  57:     0x7fc90e4c3abc - <<std[f1e96740c585910a]::thread::Builder>::spawn_unchecked_<rustc_interface[e19372daae8a4d61]::util::run_in_thread_pool_with_globals<rustc_interface[e19372daae8a4d61]::interface::run_compiler<core[f0a84df7292b9247]::result::Result<(), rustc_errors[580ee8295c6eeddb]::ErrorGuaranteed>, rustc_driver_impl[cf5be2d75a70ff02]::run_compiler::{closure#1}>::{closure#0}, core[f0a84df7292b9247]::result::Result<(), rustc_errors[580ee8295c6eeddb]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f0a84df7292b9247]::result::Result<(), rustc_errors[580ee8295c6eeddb]::ErrorGuaranteed>>::{closure#1} as core[f0a84df7292b9247]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  58:     0x7fc90bf77d23 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h6f3268749d03f717
                               at /rustc/2d14db321b043ffc579a7461464c88d7e3f54f83/library/alloc/src/boxed.rs:1988:9
  59:     0x7fc90bf77d23 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he030b34c5a5b9772
                               at /rustc/2d14db321b043ffc579a7461464c88d7e3f54f83/library/alloc/src/boxed.rs:1988:9
  60:     0x7fc90bf77d23 - std::sys::unix::thread::Thread::new::thread_start::h3f952212e35a76cc
                               at /rustc/2d14db321b043ffc579a7461464c88d7e3f54f83/library/std/src/sys/unix/thread.rs:108:17
  61:     0x7fc90bd07bb5 - <unknown>
  62:     0x7fc90bd89d90 - <unknown>
  63:                0x0 - <unknown>

error: 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.69.0-nightly (2d14db321 2023-02-15) running on x86_64-unknown-linux-gnu

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

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

query stack during panic:
#0 [type_op_normalize_ty] normalizing `[async fn body@src/main.rs:43:69: 45:14]`
#1 [mir_borrowck] borrow-checking `<impl at src/main.rs:26:9: 39:58>::try_build_or_recover::{closure#0}`
#2 [mir_borrowck] borrow-checking `<impl at src/main.rs:26:9: 39:58>::try_build_or_recover`
#3 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `scratch`

@megakorre
Copy link
Contributor

I made a failing test with a proc macro.
megakorre@8ea3b58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation 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 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.

4 participants