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

const variables should not be hashed #107280

Closed
tylerhawkes opened this issue Jan 24, 2023 · 8 comments · Fixed by #108604
Closed

const variables should not be hashed #107280

tylerhawkes opened this issue Jan 24, 2023 · 8 comments · Fixed by #108604
Assignees
Labels
C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. 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

@tylerhawkes
Copy link

It appears that the template is no longer working.

I got this after running cargo check on a build that had no issues. I then ran rustup update and cargo clean to do a fresh build and still got the error. I know it isn't related to incremental builds and it's currently giving me a headache.

thread 'rustc' panicked at 'const variables should not be hashed: Var(_#3c)', compiler/rustc_middle/src/ty/consts/kind.rs:122:35
stack backtrace:
   0:        0x1057a3cb4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h7f563e99e08996c8
   1:        0x1057ee848 - core::fmt::write::h828d1a1d9994c0d4
   2:        0x1057969c0 - std::io::Write::write_fmt::h5f89acb1837ba600
   3:        0x1057a3ac8 - std::sys_common::backtrace::print::h840392abbac6ee51
   4:        0x1057a6650 - std::panicking::default_hook::{{closure}}::h4759ed42ee25f714
   5:        0x1057a63a8 - std::panicking::default_hook::h0e3a71e8a2850720
   6:        0x10d744c5c - rustc_driver[5831ce5c342d4369]::DEFAULT_HOOK::{closure#0}::{closure#0}
   7:        0x1057a6d60 - std::panicking::rust_panic_with_hook::h7210718e7f3b5517
   8:        0x1057a6b48 - std::panicking::begin_panic_handler::{{closure}}::h783370b8bddac8b4
   9:        0x1057a411c - std::sys_common::backtrace::__rust_end_short_backtrace::h33a0191324141f1f
  10:        0x1057a689c - _rust_begin_unwind
  11:        0x10581a1d8 - core::panicking::panic_fmt::h8c7962154a272fe6
  12:        0x111399598 - <rustc_data_structures[64230fbea034ce6c]::intern::Interned<rustc_middle[ac9ca8c5bc793831]::ty::consts::ConstS> as rustc_data_structures[64230fbea034ce6c]::stable_hasher::HashStable<rustc_query_system[e53813fd6ab376cb]::ich::hcx::StableHashingContext>>::hash_stable
  13:        0x1114a3cbc - <rustc_middle[ac9ca8c5bc793831]::ty::subst::GenericArg as rustc_data_structures[64230fbea034ce6c]::stable_hasher::HashStable<rustc_query_system[e53813fd6ab376cb]::ich::hcx::StableHashingContext>>::hash_stable
  14:        0x110857a48 - <std[80e5295ce6dcb389]::thread::local::LocalKey<core[a63a2898d00cab06]::cell::RefCell<std[80e5295ce6dcb389]::collections::hash::map::HashMap<(usize, usize, rustc_data_structures[64230fbea034ce6c]::stable_hasher::HashingControls), rustc_data_structures[64230fbea034ce6c]::fingerprint::Fingerprint, core[a63a2898d00cab06]::hash::BuildHasherDefault<rustc_hash[f947d5c73c39dfc]::FxHasher>>>>>::with::<<&rustc_middle[ac9ca8c5bc793831]::ty::list::List<rustc_middle[ac9ca8c5bc793831]::ty::subst::GenericArg> as rustc_data_structures[64230fbea034ce6c]::stable_hasher::HashStable<rustc_query_system[e53813fd6ab376cb]::ich::hcx::StableHashingContext>>::hash_stable::{closure#0}, rustc_data_structures[64230fbea034ce6c]::fingerprint::Fingerprint>
  15:        0x110a1fd54 - <rustc_query_system[e53813fd6ab376cb]::ich::hcx::StableHashingContext as rustc_data_structures[64230fbea034ce6c]::intern::InternedHashingContext>::with_def_path_and_no_spans::<<rustc_data_structures[64230fbea034ce6c]::intern::WithStableHash<rustc_middle[ac9ca8c5bc793831]::ty::TyS> as rustc_data_structures[64230fbea034ce6c]::stable_hasher::HashStable<rustc_query_system[e53813fd6ab376cb]::ich::hcx::StableHashingContext>>::hash_stable::{closure#0}>
  16:        0x11083e85c - <rustc_data_structures[64230fbea034ce6c]::intern::Interned<rustc_data_structures[64230fbea034ce6c]::intern::WithStableHash<rustc_middle[ac9ca8c5bc793831]::ty::TyS>> as rustc_data_structures[64230fbea034ce6c]::stable_hasher::HashStable<rustc_query_system[e53813fd6ab376cb]::ich::hcx::StableHashingContext>>::hash_stable
  17:        0x110a3f3ac - <[rustc_middle[ac9ca8c5bc793831]::ty::context::GeneratorInteriorTypeCause] as rustc_data_structures[64230fbea034ce6c]::stable_hasher::HashStable<rustc_query_system[e53813fd6ab376cb]::ich::hcx::StableHashingContext>>::hash_stable
  18:        0x11099b398 - rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::hash_result::<&rustc_middle[ac9ca8c5bc793831]::ty::context::TypeckResults>
  19:        0x11095dfe0 - <rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_span[548211915201be8f]::def_id::LocalDefId, &rustc_middle[ac9ca8c5bc793831]::ty::context::TypeckResults>
  20:        0x1106f11a8 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::try_execute_query::<rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt, rustc_query_system[e53813fd6ab376cb]::query::caches::DefaultCache<rustc_span[548211915201be8f]::def_id::LocalDefId, &rustc_middle[ac9ca8c5bc793831]::ty::context::TypeckResults>>
  21:        0x1107c02f8 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::get_query::<rustc_query_impl[c312af6a13f88129]::queries::typeck, rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt>
  22:        0x11146d798 - <rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt>::typeck_opt_const_arg
  23:        0x1101dd1f4 - rustc_mir_build[99f58f588b3ee6d1]::thir::cx::thir_body
  24:        0x11082128c - <rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind as rustc_query_system[e53813fd6ab376cb]::dep_graph::DepKind>::with_deps::<<rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_middle[ac9ca8c5bc793831]::ty::WithOptConstParam<rustc_span[548211915201be8f]::def_id::LocalDefId>, core[a63a2898d00cab06]::result::Result<(&rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::thir::Thir>, rustc_middle[ac9ca8c5bc793831]::thir::ExprId), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>>::{closure#0}, core[a63a2898d00cab06]::result::Result<(&rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::thir::Thir>, rustc_middle[ac9ca8c5bc793831]::thir::ExprId), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>>
  25:        0x110950c44 - <rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_middle[ac9ca8c5bc793831]::ty::WithOptConstParam<rustc_span[548211915201be8f]::def_id::LocalDefId>, core[a63a2898d00cab06]::result::Result<(&rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::thir::Thir>, rustc_middle[ac9ca8c5bc793831]::thir::ExprId), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>>
  26:        0x1106d4508 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::try_execute_query::<rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt, rustc_query_system[e53813fd6ab376cb]::query::caches::DefaultCache<rustc_middle[ac9ca8c5bc793831]::ty::WithOptConstParam<rustc_span[548211915201be8f]::def_id::LocalDefId>, core[a63a2898d00cab06]::result::Result<(&rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::thir::Thir>, rustc_middle[ac9ca8c5bc793831]::thir::ExprId), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>>>
  27:        0x1107c2ae8 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::get_query::<rustc_query_impl[c312af6a13f88129]::queries::thir_body, rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt>
  28:        0x110854a10 - <rustc_query_impl[c312af6a13f88129]::Queries as rustc_middle[ac9ca8c5bc793831]::ty::query::QueryEngine>::thir_body
  29:        0x11019e3f0 - rustc_mir_build[99f58f588b3ee6d1]::build::mir_build
  30:        0x11019d6c8 - rustc_mir_build[99f58f588b3ee6d1]::build::mir_built
  31:        0x11082142c - <rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind as rustc_query_system[e53813fd6ab376cb]::dep_graph::DepKind>::with_deps::<<rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_middle[ac9ca8c5bc793831]::ty::WithOptConstParam<rustc_span[548211915201be8f]::def_id::LocalDefId>, &rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::mir::Body>>::{closure#0}, &rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::mir::Body>>
  32:        0x110951560 - <rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_middle[ac9ca8c5bc793831]::ty::WithOptConstParam<rustc_span[548211915201be8f]::def_id::LocalDefId>, &rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::mir::Body>>
  33:        0x1106d52bc - rustc_query_system[e53813fd6ab376cb]::query::plumbing::try_execute_query::<rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt, rustc_query_system[e53813fd6ab376cb]::query::caches::DefaultCache<rustc_middle[ac9ca8c5bc793831]::ty::WithOptConstParam<rustc_span[548211915201be8f]::def_id::LocalDefId>, &rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::mir::Body>>>
  34:        0x1107c25c8 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::get_query::<rustc_query_impl[c312af6a13f88129]::queries::mir_built, rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt>
  35:        0x110854ae4 - <rustc_query_impl[c312af6a13f88129]::Queries as rustc_middle[ac9ca8c5bc793831]::ty::query::QueryEngine>::mir_built
  36:        0x10fe1cff0 - rustc_mir_transform[68f6ba11eb3cbb0a]::check_unsafety::unsafety_check_result
  37:        0x10fe1a23c - <rustc_mir_transform[68f6ba11eb3cbb0a]::check_unsafety::provide::{closure#0} as core[a63a2898d00cab06]::ops::function::FnOnce<(rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_span[548211915201be8f]::def_id::LocalDefId)>>::call_once
  38:        0x11095e778 - <rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_span[548211915201be8f]::def_id::LocalDefId, &rustc_middle[ac9ca8c5bc793831]::mir::query::UnsafetyCheckResult>
  39:        0x1106f2e98 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::try_execute_query::<rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt, rustc_query_system[e53813fd6ab376cb]::query::caches::DefaultCache<rustc_span[548211915201be8f]::def_id::LocalDefId, &rustc_middle[ac9ca8c5bc793831]::mir::query::UnsafetyCheckResult>>
  40:        0x1107b3ac4 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::get_query::<rustc_query_impl[c312af6a13f88129]::queries::unsafety_check_result, rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt>
  41:        0x10fdc4110 - rustc_mir_transform[68f6ba11eb3cbb0a]::mir_const
  42:        0x11082142c - <rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind as rustc_query_system[e53813fd6ab376cb]::dep_graph::DepKind>::with_deps::<<rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_middle[ac9ca8c5bc793831]::ty::WithOptConstParam<rustc_span[548211915201be8f]::def_id::LocalDefId>, &rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::mir::Body>>::{closure#0}, &rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::mir::Body>>
  43:        0x110951560 - <rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_middle[ac9ca8c5bc793831]::ty::WithOptConstParam<rustc_span[548211915201be8f]::def_id::LocalDefId>, &rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::mir::Body>>
  44:        0x1106d52bc - rustc_query_system[e53813fd6ab376cb]::query::plumbing::try_execute_query::<rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt, rustc_query_system[e53813fd6ab376cb]::query::caches::DefaultCache<rustc_middle[ac9ca8c5bc793831]::ty::WithOptConstParam<rustc_span[548211915201be8f]::def_id::LocalDefId>, &rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::mir::Body>>>
  45:        0x1107c2704 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::get_query::<rustc_query_impl[c312af6a13f88129]::queries::mir_const, rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt>
  46:        0x110854b20 - <rustc_query_impl[c312af6a13f88129]::Queries as rustc_middle[ac9ca8c5bc793831]::ty::query::QueryEngine>::mir_const
  47:        0x10fdc4b38 - rustc_mir_transform[68f6ba11eb3cbb0a]::mir_promoted
  48:        0x110821500 - <rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind as rustc_query_system[e53813fd6ab376cb]::dep_graph::DepKind>::with_deps::<<rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_middle[ac9ca8c5bc793831]::ty::WithOptConstParam<rustc_span[548211915201be8f]::def_id::LocalDefId>, (&rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::mir::Body>, &rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_index[c8a6c4a78aa7f8ab]::vec::IndexVec<rustc_middle[ac9ca8c5bc793831]::mir::Promoted, rustc_middle[ac9ca8c5bc793831]::mir::Body>>)>::{closure#0}, (&rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::mir::Body>, &rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_index[c8a6c4a78aa7f8ab]::vec::IndexVec<rustc_middle[ac9ca8c5bc793831]::mir::Promoted, rustc_middle[ac9ca8c5bc793831]::mir::Body>>)>
  49:        0x1109519a4 - <rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_middle[ac9ca8c5bc793831]::ty::WithOptConstParam<rustc_span[548211915201be8f]::def_id::LocalDefId>, (&rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::mir::Body>, &rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_index[c8a6c4a78aa7f8ab]::vec::IndexVec<rustc_middle[ac9ca8c5bc793831]::mir::Promoted, rustc_middle[ac9ca8c5bc793831]::mir::Body>>)>
  50:        0x1106d607c - rustc_query_system[e53813fd6ab376cb]::query::plumbing::try_execute_query::<rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt, rustc_query_system[e53813fd6ab376cb]::query::caches::DefaultCache<rustc_middle[ac9ca8c5bc793831]::ty::WithOptConstParam<rustc_span[548211915201be8f]::def_id::LocalDefId>, (&rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::mir::Body>, &rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_index[c8a6c4a78aa7f8ab]::vec::IndexVec<rustc_middle[ac9ca8c5bc793831]::mir::Promoted, rustc_middle[ac9ca8c5bc793831]::mir::Body>>)>>
  51:        0x1107a8108 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::get_query::<rustc_query_impl[c312af6a13f88129]::queries::mir_promoted, rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt>
  52:        0x110854cd0 - <rustc_query_impl[c312af6a13f88129]::Queries as rustc_middle[ac9ca8c5bc793831]::ty::query::QueryEngine>::mir_promoted
  53:        0x11034c610 - rustc_borrowck[fdb729e9e5032507]::mir_borrowck
  54:        0x110335070 - <rustc_borrowck[fdb729e9e5032507]::provide::{closure#0} as core[a63a2898d00cab06]::ops::function::FnOnce<(rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_span[548211915201be8f]::def_id::LocalDefId)>>::call_once
  55:        0x11095e2e8 - <rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_span[548211915201be8f]::def_id::LocalDefId, &rustc_middle[ac9ca8c5bc793831]::mir::query::BorrowCheckResult>
  56:        0x1106f2020 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::try_execute_query::<rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt, rustc_query_system[e53813fd6ab376cb]::query::caches::DefaultCache<rustc_span[548211915201be8f]::def_id::LocalDefId, &rustc_middle[ac9ca8c5bc793831]::mir::query::BorrowCheckResult>>
  57:        0x1107a7e54 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::get_query::<rustc_query_impl[c312af6a13f88129]::queries::mir_borrowck, rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt>
  58:        0x10fc0796c - rustc_hir_analysis[5c86fd8826d6310b]::collect::type_of::find_opaque_ty_constraints_for_rpit
  59:        0x10fc06c0c - rustc_hir_analysis[5c86fd8826d6310b]::collect::type_of::type_of
  60:        0x110966ff4 - <rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_span[548211915201be8f]::def_id::DefId, rustc_middle[ac9ca8c5bc793831]::ty::Ty>
  61:        0x11070e64c - rustc_query_system[e53813fd6ab376cb]::query::plumbing::try_execute_query::<rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt, rustc_query_system[e53813fd6ab376cb]::query::caches::DefaultCache<rustc_span[548211915201be8f]::def_id::DefId, rustc_middle[ac9ca8c5bc793831]::ty::Ty>>
  62:        0x1107c05d0 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::get_query::<rustc_query_impl[c312af6a13f88129]::queries::type_of, rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt>
  63:        0x10fbc4b58 - rustc_hir_analysis[5c86fd8826d6310b]::check::check::check_item_type
  64:        0x10fbc9888 - rustc_hir_analysis[5c86fd8826d6310b]::check::check::check_mod_item_types
  65:        0x11095f0a0 - <rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_span[548211915201be8f]::def_id::LocalDefId, ()>
  66:        0x1106f4b84 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::try_execute_query::<rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt, rustc_query_system[e53813fd6ab376cb]::query::caches::DefaultCache<rustc_span[548211915201be8f]::def_id::LocalDefId, ()>>
  67:        0x1107b1d34 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::get_query::<rustc_query_impl[c312af6a13f88129]::queries::check_mod_item_types, rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt>
  68:        0x10fbe8de4 - <rustc_middle[ac9ca8c5bc793831]::hir::map::Map>::for_each_module::<rustc_hir_analysis[5c86fd8826d6310b]::check_crate::{closure#6}::{closure#0}>
  69:        0x10fbdc0c4 - <rustc_session[4ff97c08bd59e358]::session::Session>::time::<(), rustc_hir_analysis[5c86fd8826d6310b]::check_crate::{closure#6}>
  70:        0x10fb967cc - rustc_hir_analysis[5c86fd8826d6310b]::check_crate
  71:        0x10d7fb548 - rustc_interface[c658e2eb83b650ee]::passes::analysis
  72:        0x1109863bc - <rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, (), core[a63a2898d00cab06]::result::Result<(), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>>
  73:        0x110758690 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::try_execute_query::<rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt, rustc_query_system[e53813fd6ab376cb]::query::caches::DefaultCache<(), core[a63a2898d00cab06]::result::Result<(), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>>>
  74:        0x1107c0704 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::get_query::<rustc_query_impl[c312af6a13f88129]::queries::analysis, rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt>
  75:        0x10d6e0f1c - <rustc_interface[c658e2eb83b650ee]::passes::QueryContext>::enter::<rustc_driver[5831ce5c342d4369]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[a63a2898d00cab06]::result::Result<(), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>>
  76:        0x10d71d354 - rustc_span[548211915201be8f]::with_source_map::<core[a63a2898d00cab06]::result::Result<(), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>, rustc_interface[c658e2eb83b650ee]::interface::run_compiler<core[a63a2898d00cab06]::result::Result<(), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>, rustc_driver[5831ce5c342d4369]::run_compiler::{closure#1}>::{closure#0}::{closure#1}>
  77:        0x10d70f154 - <scoped_tls[60132be391e98e3a]::ScopedKey<rustc_span[548211915201be8f]::SessionGlobals>>::set::<rustc_interface[c658e2eb83b650ee]::interface::run_compiler<core[a63a2898d00cab06]::result::Result<(), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>, rustc_driver[5831ce5c342d4369]::run_compiler::{closure#1}>::{closure#0}, core[a63a2898d00cab06]::result::Result<(), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>>
  78:        0x10d6e3dc0 - std[80e5295ce6dcb389]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[c658e2eb83b650ee]::util::run_in_thread_pool_with_globals<rustc_interface[c658e2eb83b650ee]::interface::run_compiler<core[a63a2898d00cab06]::result::Result<(), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>, rustc_driver[5831ce5c342d4369]::run_compiler::{closure#1}>::{closure#0}, core[a63a2898d00cab06]::result::Result<(), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[a63a2898d00cab06]::result::Result<(), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>>
  79:        0x10d6cd60c - <<std[80e5295ce6dcb389]::thread::Builder>::spawn_unchecked_<rustc_interface[c658e2eb83b650ee]::util::run_in_thread_pool_with_globals<rustc_interface[c658e2eb83b650ee]::interface::run_compiler<core[a63a2898d00cab06]::result::Result<(), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>, rustc_driver[5831ce5c342d4369]::run_compiler::{closure#1}>::{closure#0}, core[a63a2898d00cab06]::result::Result<(), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[a63a2898d00cab06]::result::Result<(), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>>::{closure#1} as core[a63a2898d00cab06]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  80:        0x1057aedc4 - std::sys::unix::thread::Thread::new::thread_start::h0a3d725412114228
  81:        0x19040106c - __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.66.1 (90743e729 2023-01-10) running on aarch64-apple-darwin

note: compiler flags: --crate-type bin -C opt-level=1 -C lto=off -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C debug-assertions=on -C linker=clang -C incremental=[REDACTED] -C link-arg=-fuse-ld=mold -C target-cpu=native

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

query stack during panic:
#0 [typeck] type-checking `init_entities`
#1 [thir_body] building THIR for `init_entities`
#2 [mir_built] building MIR for `init_entities`
#3 [unsafety_check_result] unsafety-checking `init_entities`
#4 [mir_const] preparing `init_entities` for borrow checking
#5 [mir_promoted] processing MIR for `init_entities`
#6 [mir_borrowck] borrow-checking `init_entities`
#7 [type_of] computing type of `init_entities::{opaque#0}`
#8 [check_mod_item_types] checking item types in top-level module
#9 [analysis] running analysis passes on this crate
end of query stack
@compiler-errors
Copy link
Member

Can you share some code that produced this error?

@inquisitivecrystal
Copy link
Contributor

inquisitivecrystal commented Jan 24, 2023

It appears that the template is no longer working.

The link recently changed. If you don't mind, where did you find this link? (If it's somewhere official, we should change it.)

@Noratrieb Noratrieb added 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. C-bug Category: This is a bug. labels Jan 25, 2023
@Noratrieb
Copy link
Member

Noratrieb commented Jan 25, 2023

There is a link in the ICE message in "older" compilers. See #106898 for adding the template back @inquisitivecrystal

@inquisitivecrystal
Copy link
Contributor

There is a link in the ICE message in "older" compilers. See #106898 for adding the template back @inquisitivecrystal

Thanks for explaining! Well, that's really easy to fix; all we need is time travel! 😆

@tylerhawkes
Copy link
Author

The link recently changed. If you don't mind, where did you find this link? (If it's somewhere official, we should change it.)

It was part of the compiler output on 1.66.1.

Sorry, I can't share the code. I was in the middle of refactoring something and had this pop up. I was able to compile it on nightly and when the compile errors went away the stable compiler no longer had the issue. The project I was working on is ~2600 lines of code and I wouldn't even know where to start. If it happens again I'll do commits so that I can figure out what change triggered this.

@izik1
Copy link

izik1 commented Feb 23, 2023

Hi! I seem to have found this ICE or a similar one with this rust -vV output:

rustc 1.66.0-nightly (5e9772042 2022-10-29)
binary: rustc
commit-hash: 5e9772042948002f9c6f60c4c81603170035fffa
commit-date: 2022-10-29
host: aarch64-apple-darwin
release: 1.66.0-nightly
LLVM version: 15.0.2

It also reproduces in stable 1.66.1, However it doesn't reproduce on stable 1.66.1 or the current nightly (the below version for cargo, unfortunately the rustc version for nightly is hard)

cargo 1.69.0-nightly (17b3d0de0 2023-02-17)
release: 1.69.0-nightly
commit-hash: 17b3d0de0897e1c6b8ca347bd39f850bb0a5b9f6
commit-date: 2023-02-17
host: aarch64-apple-darwin
libgit2: 1.5.0 (sys:0.16.0 vendored)
libcurl: 7.86.0 (sys:0.4.59+curl-7.86.0 system ssl:(SecureTransport) LibreSSL/3.3.6)
os: Mac OS 13.2.1 [64-bit]

The reason I think I have the same or a similar ICE is because, well, it starts out the same as well as having the same query stack:

thread 'rustc' panicked at 'const variables should not be hashed: Var(_#0c)', compiler/rustc_middle/src/ty/consts/kind.rs:122:35

...
query stack during panic:
#0 [typeck] type-checking `execute::execute`
#1 [thir_body] building THIR for `execute::execute`
#2 [mir_built] building MIR for `execute::execute`
#3 [unsafety_check_result] unsafety-checking `execute::execute`
#4 [mir_const] preparing `execute::execute` for borrow checking
#5 [mir_promoted] processing MIR for `execute::execute`
#6 [mir_borrowck] borrow-checking `execute::execute`
#7 [type_of] computing type of `execute::execute::{opaque#0}`
#8 [check_mod_item_types] checking item types in module `client`
#9 [analysis] running analysis passes on this crate
end of query stack

I'll try to reproduce it on Friday ish to bisect where / when this happened, and why (so that we can probably mark it as already fixed, unless I happen to uncover a root cause that still exists)

@izik1
Copy link

izik1 commented Feb 24, 2023

MRE

async fn foo() {
    inner::<false>().await
}

async fn inner<T, const PING: bool>() {}

Full ICE:

Full ICE
thread 'rustc' panicked at 'const variables should not be hashed: Var(_#0c)', compiler/rustc_middle/src/ty/consts/kind.rs:122:35
stack backtrace:
   0:        0x1037bfcb4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h7f563e99e08996c8
   1:        0x10380a848 - core::fmt::write::h828d1a1d9994c0d4
   2:        0x1037b29c0 - std::io::Write::write_fmt::h5f89acb1837ba600
   3:        0x1037bfac8 - std::sys_common::backtrace::print::h840392abbac6ee51
   4:        0x1037c2650 - std::panicking::default_hook::{{closure}}::h4759ed42ee25f714
   5:        0x1037c23a8 - std::panicking::default_hook::h0e3a71e8a2850720
   6:        0x10b760c5c - rustc_driver[5831ce5c342d4369]::DEFAULT_HOOK::{closure#0}::{closure#0}
   7:        0x1037c2d60 - std::panicking::rust_panic_with_hook::h7210718e7f3b5517
   8:        0x1037c2b48 - std::panicking::begin_panic_handler::{{closure}}::h783370b8bddac8b4
   9:        0x1037c011c - std::sys_common::backtrace::__rust_end_short_backtrace::h33a0191324141f1f
  10:        0x1037c289c - _rust_begin_unwind
  11:        0x1038361d8 - core::panicking::panic_fmt::h8c7962154a272fe6
  12:        0x10f3b5598 - <rustc_data_structures[64230fbea034ce6c]::intern::Interned<rustc_middle[ac9ca8c5bc793831]::ty::consts::ConstS> as rustc_data_structures[64230fbea034ce6c]::stable_hasher::HashStable<rustc_query_system[e53813fd6ab376cb]::ich::hcx::StableHashingContext>>::hash_stable
  13:        0x10f4bfcbc - <rustc_middle[ac9ca8c5bc793831]::ty::subst::GenericArg as rustc_data_structures[64230fbea034ce6c]::stable_hasher::HashStable<rustc_query_system[e53813fd6ab376cb]::ich::hcx::StableHashingContext>>::hash_stable
  14:        0x10e873a48 - <std[80e5295ce6dcb389]::thread::local::LocalKey<core[a63a2898d00cab06]::cell::RefCell<std[80e5295ce6dcb389]::collections::hash::map::HashMap<(usize, usize, rustc_data_structures[64230fbea034ce6c]::stable_hasher::HashingControls), rustc_data_structures[64230fbea034ce6c]::fingerprint::Fingerprint, core[a63a2898d00cab06]::hash::BuildHasherDefault<rustc_hash[f947d5c73c39dfc]::FxHasher>>>>>::with::<<&rustc_middle[ac9ca8c5bc793831]::ty::list::List<rustc_middle[ac9ca8c5bc793831]::ty::subst::GenericArg> as rustc_data_structures[64230fbea034ce6c]::stable_hasher::HashStable<rustc_query_system[e53813fd6ab376cb]::ich::hcx::StableHashingContext>>::hash_stable::{closure#0}, rustc_data_structures[64230fbea034ce6c]::fingerprint::Fingerprint>
  15:        0x10ea3bd18 - <rustc_query_system[e53813fd6ab376cb]::ich::hcx::StableHashingContext as rustc_data_structures[64230fbea034ce6c]::intern::InternedHashingContext>::with_def_path_and_no_spans::<<rustc_data_structures[64230fbea034ce6c]::intern::WithStableHash<rustc_middle[ac9ca8c5bc793831]::ty::TyS> as rustc_data_structures[64230fbea034ce6c]::stable_hasher::HashStable<rustc_query_system[e53813fd6ab376cb]::ich::hcx::StableHashingContext>>::hash_stable::{closure#0}>
  16:        0x10e85a85c - <rustc_data_structures[64230fbea034ce6c]::intern::Interned<rustc_data_structures[64230fbea034ce6c]::intern::WithStableHash<rustc_middle[ac9ca8c5bc793831]::ty::TyS>> as rustc_data_structures[64230fbea034ce6c]::stable_hasher::HashStable<rustc_query_system[e53813fd6ab376cb]::ich::hcx::StableHashingContext>>::hash_stable
  17:        0x10ea5b3ac - <[rustc_middle[ac9ca8c5bc793831]::ty::context::GeneratorInteriorTypeCause] as rustc_data_structures[64230fbea034ce6c]::stable_hasher::HashStable<rustc_query_system[e53813fd6ab376cb]::ich::hcx::StableHashingContext>>::hash_stable
  18:        0x10e9b7398 - rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::hash_result::<&rustc_middle[ac9ca8c5bc793831]::ty::context::TypeckResults>
  19:        0x10e979fe0 - <rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_span[548211915201be8f]::def_id::LocalDefId, &rustc_middle[ac9ca8c5bc793831]::ty::context::TypeckResults>
  20:        0x10e70d1a8 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::try_execute_query::<rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt, rustc_query_system[e53813fd6ab376cb]::query::caches::DefaultCache<rustc_span[548211915201be8f]::def_id::LocalDefId, &rustc_middle[ac9ca8c5bc793831]::ty::context::TypeckResults>>
  21:        0x10e7dc2f8 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::get_query::<rustc_query_impl[c312af6a13f88129]::queries::typeck, rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt>
  22:        0x10f489798 - <rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt>::typeck_opt_const_arg
  23:        0x10e1f91f4 - rustc_mir_build[99f58f588b3ee6d1]::thir::cx::thir_body
  24:        0x10e83d28c - <rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind as rustc_query_system[e53813fd6ab376cb]::dep_graph::DepKind>::with_deps::<<rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_middle[ac9ca8c5bc793831]::ty::WithOptConstParam<rustc_span[548211915201be8f]::def_id::LocalDefId>, core[a63a2898d00cab06]::result::Result<(&rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::thir::Thir>, rustc_middle[ac9ca8c5bc793831]::thir::ExprId), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>>::{closure#0}, core[a63a2898d00cab06]::result::Result<(&rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::thir::Thir>, rustc_middle[ac9ca8c5bc793831]::thir::ExprId), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>>
  25:        0x10e96cc44 - <rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_middle[ac9ca8c5bc793831]::ty::WithOptConstParam<rustc_span[548211915201be8f]::def_id::LocalDefId>, core[a63a2898d00cab06]::result::Result<(&rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::thir::Thir>, rustc_middle[ac9ca8c5bc793831]::thir::ExprId), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>>
  26:        0x10e6f0508 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::try_execute_query::<rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt, rustc_query_system[e53813fd6ab376cb]::query::caches::DefaultCache<rustc_middle[ac9ca8c5bc793831]::ty::WithOptConstParam<rustc_span[548211915201be8f]::def_id::LocalDefId>, core[a63a2898d00cab06]::result::Result<(&rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::thir::Thir>, rustc_middle[ac9ca8c5bc793831]::thir::ExprId), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>>>
  27:        0x10e7deae8 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::get_query::<rustc_query_impl[c312af6a13f88129]::queries::thir_body, rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt>
  28:        0x10e870a10 - <rustc_query_impl[c312af6a13f88129]::Queries as rustc_middle[ac9ca8c5bc793831]::ty::query::QueryEngine>::thir_body
  29:        0x10e1ba3f0 - rustc_mir_build[99f58f588b3ee6d1]::build::mir_build
  30:        0x10e1b96c8 - rustc_mir_build[99f58f588b3ee6d1]::build::mir_built
  31:        0x10e83d42c - <rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind as rustc_query_system[e53813fd6ab376cb]::dep_graph::DepKind>::with_deps::<<rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_middle[ac9ca8c5bc793831]::ty::WithOptConstParam<rustc_span[548211915201be8f]::def_id::LocalDefId>, &rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::mir::Body>>::{closure#0}, &rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::mir::Body>>
  32:        0x10e96d560 - <rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_middle[ac9ca8c5bc793831]::ty::WithOptConstParam<rustc_span[548211915201be8f]::def_id::LocalDefId>, &rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::mir::Body>>
  33:        0x10e6f12bc - rustc_query_system[e53813fd6ab376cb]::query::plumbing::try_execute_query::<rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt, rustc_query_system[e53813fd6ab376cb]::query::caches::DefaultCache<rustc_middle[ac9ca8c5bc793831]::ty::WithOptConstParam<rustc_span[548211915201be8f]::def_id::LocalDefId>, &rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::mir::Body>>>
  34:        0x10e7de5c8 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::get_query::<rustc_query_impl[c312af6a13f88129]::queries::mir_built, rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt>
  35:        0x10e870ae4 - <rustc_query_impl[c312af6a13f88129]::Queries as rustc_middle[ac9ca8c5bc793831]::ty::query::QueryEngine>::mir_built
  36:        0x10de38ff0 - rustc_mir_transform[68f6ba11eb3cbb0a]::check_unsafety::unsafety_check_result
  37:        0x10de3623c - <rustc_mir_transform[68f6ba11eb3cbb0a]::check_unsafety::provide::{closure#0} as core[a63a2898d00cab06]::ops::function::FnOnce<(rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_span[548211915201be8f]::def_id::LocalDefId)>>::call_once
  38:        0x10e97a778 - <rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_span[548211915201be8f]::def_id::LocalDefId, &rustc_middle[ac9ca8c5bc793831]::mir::query::UnsafetyCheckResult>
  39:        0x10e70ee98 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::try_execute_query::<rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt, rustc_query_system[e53813fd6ab376cb]::query::caches::DefaultCache<rustc_span[548211915201be8f]::def_id::LocalDefId, &rustc_middle[ac9ca8c5bc793831]::mir::query::UnsafetyCheckResult>>
  40:        0x10e7cfac4 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::get_query::<rustc_query_impl[c312af6a13f88129]::queries::unsafety_check_result, rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt>
  41:        0x10dde0110 - rustc_mir_transform[68f6ba11eb3cbb0a]::mir_const
  42:        0x10e83d42c - <rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind as rustc_query_system[e53813fd6ab376cb]::dep_graph::DepKind>::with_deps::<<rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_middle[ac9ca8c5bc793831]::ty::WithOptConstParam<rustc_span[548211915201be8f]::def_id::LocalDefId>, &rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::mir::Body>>::{closure#0}, &rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::mir::Body>>
  43:        0x10e96d560 - <rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_middle[ac9ca8c5bc793831]::ty::WithOptConstParam<rustc_span[548211915201be8f]::def_id::LocalDefId>, &rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::mir::Body>>
  44:        0x10e6f12bc - rustc_query_system[e53813fd6ab376cb]::query::plumbing::try_execute_query::<rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt, rustc_query_system[e53813fd6ab376cb]::query::caches::DefaultCache<rustc_middle[ac9ca8c5bc793831]::ty::WithOptConstParam<rustc_span[548211915201be8f]::def_id::LocalDefId>, &rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::mir::Body>>>
  45:        0x10e7de704 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::get_query::<rustc_query_impl[c312af6a13f88129]::queries::mir_const, rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt>
  46:        0x10e870b20 - <rustc_query_impl[c312af6a13f88129]::Queries as rustc_middle[ac9ca8c5bc793831]::ty::query::QueryEngine>::mir_const
  47:        0x10dde0b38 - rustc_mir_transform[68f6ba11eb3cbb0a]::mir_promoted
  48:        0x10e83d500 - <rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind as rustc_query_system[e53813fd6ab376cb]::dep_graph::DepKind>::with_deps::<<rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_middle[ac9ca8c5bc793831]::ty::WithOptConstParam<rustc_span[548211915201be8f]::def_id::LocalDefId>, (&rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::mir::Body>, &rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_index[c8a6c4a78aa7f8ab]::vec::IndexVec<rustc_middle[ac9ca8c5bc793831]::mir::Promoted, rustc_middle[ac9ca8c5bc793831]::mir::Body>>)>::{closure#0}, (&rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::mir::Body>, &rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_index[c8a6c4a78aa7f8ab]::vec::IndexVec<rustc_middle[ac9ca8c5bc793831]::mir::Promoted, rustc_middle[ac9ca8c5bc793831]::mir::Body>>)>
  49:        0x10e96d9a4 - <rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_middle[ac9ca8c5bc793831]::ty::WithOptConstParam<rustc_span[548211915201be8f]::def_id::LocalDefId>, (&rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::mir::Body>, &rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_index[c8a6c4a78aa7f8ab]::vec::IndexVec<rustc_middle[ac9ca8c5bc793831]::mir::Promoted, rustc_middle[ac9ca8c5bc793831]::mir::Body>>)>
  50:        0x10e6f207c - rustc_query_system[e53813fd6ab376cb]::query::plumbing::try_execute_query::<rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt, rustc_query_system[e53813fd6ab376cb]::query::caches::DefaultCache<rustc_middle[ac9ca8c5bc793831]::ty::WithOptConstParam<rustc_span[548211915201be8f]::def_id::LocalDefId>, (&rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_middle[ac9ca8c5bc793831]::mir::Body>, &rustc_data_structures[64230fbea034ce6c]::steal::Steal<rustc_index[c8a6c4a78aa7f8ab]::vec::IndexVec<rustc_middle[ac9ca8c5bc793831]::mir::Promoted, rustc_middle[ac9ca8c5bc793831]::mir::Body>>)>>
  51:        0x10e7c4108 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::get_query::<rustc_query_impl[c312af6a13f88129]::queries::mir_promoted, rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt>
  52:        0x10e870cd0 - <rustc_query_impl[c312af6a13f88129]::Queries as rustc_middle[ac9ca8c5bc793831]::ty::query::QueryEngine>::mir_promoted
  53:        0x10e368610 - rustc_borrowck[fdb729e9e5032507]::mir_borrowck
  54:        0x10e351070 - <rustc_borrowck[fdb729e9e5032507]::provide::{closure#0} as core[a63a2898d00cab06]::ops::function::FnOnce<(rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_span[548211915201be8f]::def_id::LocalDefId)>>::call_once
  55:        0x10e97a2e8 - <rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_span[548211915201be8f]::def_id::LocalDefId, &rustc_middle[ac9ca8c5bc793831]::mir::query::BorrowCheckResult>
  56:        0x10e70e020 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::try_execute_query::<rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt, rustc_query_system[e53813fd6ab376cb]::query::caches::DefaultCache<rustc_span[548211915201be8f]::def_id::LocalDefId, &rustc_middle[ac9ca8c5bc793831]::mir::query::BorrowCheckResult>>
  57:        0x10e7c3e54 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::get_query::<rustc_query_impl[c312af6a13f88129]::queries::mir_borrowck, rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt>
  58:        0x10dc2396c - rustc_hir_analysis[5c86fd8826d6310b]::collect::type_of::find_opaque_ty_constraints_for_rpit
  59:        0x10dc22c0c - rustc_hir_analysis[5c86fd8826d6310b]::collect::type_of::type_of
  60:        0x10e982ff4 - <rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_span[548211915201be8f]::def_id::DefId, rustc_middle[ac9ca8c5bc793831]::ty::Ty>
  61:        0x10e72a64c - rustc_query_system[e53813fd6ab376cb]::query::plumbing::try_execute_query::<rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt, rustc_query_system[e53813fd6ab376cb]::query::caches::DefaultCache<rustc_span[548211915201be8f]::def_id::DefId, rustc_middle[ac9ca8c5bc793831]::ty::Ty>>
  62:        0x10e7dc5d0 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::get_query::<rustc_query_impl[c312af6a13f88129]::queries::type_of, rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt>
  63:        0x10dbe0b58 - rustc_hir_analysis[5c86fd8826d6310b]::check::check::check_item_type
  64:        0x10dbe5888 - rustc_hir_analysis[5c86fd8826d6310b]::check::check::check_mod_item_types
  65:        0x10e97b0a0 - <rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, rustc_span[548211915201be8f]::def_id::LocalDefId, ()>
  66:        0x10e710b84 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::try_execute_query::<rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt, rustc_query_system[e53813fd6ab376cb]::query::caches::DefaultCache<rustc_span[548211915201be8f]::def_id::LocalDefId, ()>>
  67:        0x10e7cdd34 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::get_query::<rustc_query_impl[c312af6a13f88129]::queries::check_mod_item_types, rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt>
  68:        0x10dc04de4 - <rustc_middle[ac9ca8c5bc793831]::hir::map::Map>::for_each_module::<rustc_hir_analysis[5c86fd8826d6310b]::check_crate::{closure#6}::{closure#0}>
  69:        0x10dbf80c4 - <rustc_session[4ff97c08bd59e358]::session::Session>::time::<(), rustc_hir_analysis[5c86fd8826d6310b]::check_crate::{closure#6}>
  70:        0x10dbb27cc - rustc_hir_analysis[5c86fd8826d6310b]::check_crate
  71:        0x10b817548 - rustc_interface[c658e2eb83b650ee]::passes::analysis
  72:        0x10e9a23bc - <rustc_query_system[e53813fd6ab376cb]::dep_graph::graph::DepGraph<rustc_middle[ac9ca8c5bc793831]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[ac9ca8c5bc793831]::ty::context::TyCtxt, (), core[a63a2898d00cab06]::result::Result<(), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>>
  73:        0x10e774690 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::try_execute_query::<rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt, rustc_query_system[e53813fd6ab376cb]::query::caches::DefaultCache<(), core[a63a2898d00cab06]::result::Result<(), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>>>
  74:        0x10e7dc704 - rustc_query_system[e53813fd6ab376cb]::query::plumbing::get_query::<rustc_query_impl[c312af6a13f88129]::queries::analysis, rustc_query_impl[c312af6a13f88129]::plumbing::QueryCtxt>
  75:        0x10b6fcf1c - <rustc_interface[c658e2eb83b650ee]::passes::QueryContext>::enter::<rustc_driver[5831ce5c342d4369]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[a63a2898d00cab06]::result::Result<(), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>>
  76:        0x10b739354 - rustc_span[548211915201be8f]::with_source_map::<core[a63a2898d00cab06]::result::Result<(), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>, rustc_interface[c658e2eb83b650ee]::interface::run_compiler<core[a63a2898d00cab06]::result::Result<(), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>, rustc_driver[5831ce5c342d4369]::run_compiler::{closure#1}>::{closure#0}::{closure#1}>
  77:        0x10b72b154 - <scoped_tls[60132be391e98e3a]::ScopedKey<rustc_span[548211915201be8f]::SessionGlobals>>::set::<rustc_interface[c658e2eb83b650ee]::interface::run_compiler<core[a63a2898d00cab06]::result::Result<(), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>, rustc_driver[5831ce5c342d4369]::run_compiler::{closure#1}>::{closure#0}, core[a63a2898d00cab06]::result::Result<(), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>>
  78:        0x10b6ffdc0 - std[80e5295ce6dcb389]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[c658e2eb83b650ee]::util::run_in_thread_pool_with_globals<rustc_interface[c658e2eb83b650ee]::interface::run_compiler<core[a63a2898d00cab06]::result::Result<(), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>, rustc_driver[5831ce5c342d4369]::run_compiler::{closure#1}>::{closure#0}, core[a63a2898d00cab06]::result::Result<(), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[a63a2898d00cab06]::result::Result<(), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>>
  79:        0x10b6e960c - <<std[80e5295ce6dcb389]::thread::Builder>::spawn_unchecked_<rustc_interface[c658e2eb83b650ee]::util::run_in_thread_pool_with_globals<rustc_interface[c658e2eb83b650ee]::interface::run_compiler<core[a63a2898d00cab06]::result::Result<(), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>, rustc_driver[5831ce5c342d4369]::run_compiler::{closure#1}>::{closure#0}, core[a63a2898d00cab06]::result::Result<(), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[a63a2898d00cab06]::result::Result<(), rustc_errors[1f6baef87c961037]::ErrorGuaranteed>>::{closure#1} as core[a63a2898d00cab06]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  80:        0x1037cadc4 - std::sys::unix::thread::Thread::new::thread_start::h0a3d725412114228
  81:        0x19592e06c - __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.66.1 (90743e729 2023-01-10) 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 `foo`
#1 [thir_body] building THIR for `foo`
#2 [mir_built] building MIR for `foo`
#3 [unsafety_check_result] unsafety-checking `foo`
#4 [mir_const] preparing `foo` for borrow checking
#5 [mir_promoted] processing MIR for `foo`
#6 [mir_borrowck] borrow-checking `foo`
#7 [type_of] computing type of `foo::{opaque#0}`
#8 [check_mod_item_types] checking item types in top-level module
#9 [analysis] running analysis passes on this crate
end of query stack
cargo-bisect-rustc for start:

Regression in 4b3b731


searched nightlies: from nightly-2022-10-15 to nightly-2022-10-30
regressed nightly: nightly-2022-10-21
searched commit range: 4b8f431...dcb3761
regressed commit: 4b3b731

bisected with cargo-bisect-rustc v0.6.5

Host triple: aarch64-apple-darwin
Reproduce with:

cargo bisect-rustc --regress ice 

cargo-bisect-rustc for end:


Regression in 80a9646


searched nightlies: from nightly-2022-10-21 to nightly-2023-02-24
regressed nightly: nightly-2022-11-27
searched commit range: 8681d4c...80a9646
regressed commit: 80a9646

bisected with cargo-bisect-rustc v0.6.5

Host triple: aarch64-apple-darwin
Reproduce with:

cargo bisect-rustc --regress non-ice --start 2022-10-21 

@izik1
Copy link

izik1 commented Feb 24, 2023

Reading that leads me to #104788
which fixed #104787

@compiler-errors compiler-errors added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Feb 24, 2023
JohnTitor added a commit to JohnTitor/rust that referenced this issue Mar 1, 2023
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
bors added a commit to rust-lang-ci/rust that referenced this issue Mar 1, 2023
Rollup of 7 pull requests

Successful merges:

 - rust-lang#108143 (rustdoc: search by macro when query ends with `!`)
 - rust-lang#108394 (Make `x doc --open` work on every book)
 - rust-lang#108427 (Recover from for-else and while-else)
 - rust-lang#108462 (Fix `VecDeque::append` capacity overflow for ZSTs)
 - rust-lang#108568 (Make associated_item_def_ids for traits use an unstable option to also return associated types for RPITITs)
 - rust-lang#108604 (Add regression test for rust-lang#107280)
 - rust-lang#108605 (Add regression test for rust-lang#105821)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors closed this as completed in 0ed76b4 Mar 1, 2023
@compiler-errors compiler-errors self-assigned this Mar 16, 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. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. 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.

5 participants