Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICE: no hir id for defid: compiler/rustc_middle/src/hir/mod.rs:76:36 #95307

Closed
matthiaskrgr opened this issue Mar 25, 2022 · 4 comments · Fixed by #97829
Closed

ICE: no hir id for defid: compiler/rustc_middle/src/hir/mod.rs:76:36 #95307

matthiaskrgr opened this issue Mar 25, 2022 · 4 comments · Fixed by #97829
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. F-async_fn_in_trait Static async fn in traits glacier ICE tracked in rust-lang/glacier. 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

@matthiaskrgr
Copy link
Member

matthiaskrgr commented Mar 25, 2022

Code

pub trait C{async fn new(val: T) -> [u8; _];
  as Trait<&'a u32> Collate<MASK> for () = [0u8; 4];
   use std::mem;

fn foo<T: Tr>() -> usize {
     macro ice(){}

fn main(){}

Meta

rustc --version --verbose:

rustc 1.61.0-nightly (63b8f01bb 2022-03-24)
binary: rustc
commit-hash: 63b8f01bb5ca277e7df8d7efe094ed4244c1790c
commit-date: 2022-03-24
host: x86_64-unknown-linux-gnu
release: 1.61.0-nightly
LLVM version: 14.0.0

Error output

error: this file contains an unclosed delimiter
 --> ./icemaker_72173.rs:8:13
  |
1 | pub trait C{async fn new(val: T) -> [u8; _];
  |            - unclosed delimiter
...
5 | fn foo<T: Tr>() -> usize {
  |                          - unclosed delimiter
...
8 | fn main(){}
  |             ^

error[E0670]: `async fn` is not permitted in Rust 2015
 --> ./icemaker_72173.rs:1:13
  |
1 | pub trait C{async fn new(val: T) -> [u8; _];
  |             ^^^^^ to use `async fn`, switch to Rust 2018 or later
  |
  = help: pass `--edition 2021` to `rustc`
  = note: for more on editions, read https://doc.rust-lang.org/edition-guide

error: non-item in item list
 --> ./icemaker_72173.rs:2:3
  |
1 | pub trait C{async fn new(val: T) -> [u8; _];
  |            - item list starts here
2 |   as Trait<&'a u32> Collate<MASK> for () = [0u8; 4];
  |   ^^ non-item starts here
...
8 | fn main(){}
  |             - item list ends here

error[E0706]: functions in traits cannot be declared `async`
 --> ./icemaker_72173.rs:1:13
  |
1 | pub trait C{async fn new(val: T) -> [u8; _];
  |             -----^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |             |
  |             `async` because of this
  |
  = note: `async` trait functions are not currently supported
  = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait

error[E0412]: cannot find type `T` in this scope
 --> ./icemaker_72173.rs:1:31
  |
1 | pub trait C{async fn new(val: T) -> [u8; _];
  |                               ^ not found in this scope

error[E0658]: using `_` for array lengths is unstable
 --> ./icemaker_72173.rs:1:42
  |
1 | pub trait C{async fn new(val: T) -> [u8; _];
  |                                          ^
  |
  = note: see issue #85077 <https://github.com/rust-lang/rust/issues/85077> for more information
  = help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable

error: in expressions, `_` can only be used on the left-hand side of an assignment
 --> ./icemaker_72173.rs:1:42
  |
1 | pub trait C{async fn new(val: T) -> [u8; _];
  |                                          ^ `_` not allowed here

error: internal compiler error: compiler/rustc_middle/src/hir/mod.rs:76:36: No HirId for DefId(0:5 ~ icemaker_72173[a007]::C::new::{opaque#0})

thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1261:9
stack backtrace:
Backtrace

error: internal compiler error: compiler/rustc_middle/src/hir/mod.rs:76:36: No HirId for DefId(0:5 ~ icemaker_72173[a007]::C::new::{opaque#0})

thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1261:9
stack backtrace:
   0:     0x7f1ddbc9d55d - std::backtrace_rs::backtrace::libunwind::trace::h2d2403a4858e54e0
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f1ddbc9d55d - std::backtrace_rs::backtrace::trace_unsynchronized::h19488f91fb99335d
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f1ddbc9d55d - std::sys_common::backtrace::_print_fmt::hc7dc3caa1b1fa1a8
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7f1ddbc9d55d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hdd9bf0d62a609be4
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7f1ddbcf755c - core::fmt::write::h5aa356cee5fb9fa9
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/core/src/fmt/mod.rs:1190:17
   5:     0x7f1ddbc8eb51 - std::io::Write::write_fmt::h5f1c72988edc233a
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/std/src/io/mod.rs:1655:15
   6:     0x7f1ddbca0645 - std::sys_common::backtrace::_print::hf7422c13ad711003
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7f1ddbca0645 - std::sys_common::backtrace::print::hd1d7cd277e511da8
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7f1ddbca0645 - std::panicking::default_hook::{{closure}}::h197cc907105123d7
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/std/src/panicking.rs:295:22
   9:     0x7f1ddbca02f9 - std::panicking::default_hook::h1359dace8bca1122
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/std/src/panicking.rs:314:9
  10:     0x7f1ddc4ce2e1 - rustc_driver[dfa02f50b2a2e61e]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f1ddbca0d90 - std::panicking::rust_panic_with_hook::h6964c34f5177236d
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/std/src/panicking.rs:702:17
  12:     0x7f1ddd5751f1 - std[93bbb3cd3e7c1062]::panicking::begin_panic::<rustc_errors[b882cf8cc0f2d9b3]::ExplicitBug>::{closure#0}
  13:     0x7f1ddd5750b6 - std[93bbb3cd3e7c1062]::sys_common::backtrace::__rust_end_short_backtrace::<std[93bbb3cd3e7c1062]::panicking::begin_panic<rustc_errors[b882cf8cc0f2d9b3]::ExplicitBug>::{closure#0}, !>
  14:     0x7f1ddd57bfff - std[93bbb3cd3e7c1062]::panicking::begin_panic::<rustc_errors[b882cf8cc0f2d9b3]::ExplicitBug>
  15:     0x7f1ddd588f16 - std[93bbb3cd3e7c1062]::panic::panic_any::<rustc_errors[b882cf8cc0f2d9b3]::ExplicitBug>
  16:     0x7f1ddd58a6f3 - <rustc_errors[b882cf8cc0f2d9b3]::HandlerInner>::bug
  17:     0x7f1ddd58a150 - <rustc_errors[b882cf8cc0f2d9b3]::Handler>::bug
  18:     0x7f1ddd4c68b6 - rustc_middle[c43c5dddfafcfdf0]::ty::context::tls::with_opt::<rustc_middle[c43c5dddfafcfdf0]::util::bug::opt_span_bug_fmt<rustc_span[5a327fbd7b70632c]::span_encoding::Span>::{closure#0}, ()>
  19:     0x7f1ddd4c9946 - rustc_middle[c43c5dddfafcfdf0]::util::bug::opt_span_bug_fmt::<rustc_span[5a327fbd7b70632c]::span_encoding::Span>
  20:     0x7f1ddd4c98b3 - rustc_middle[c43c5dddfafcfdf0]::util::bug::bug_fmt
  21:     0x7f1dde2523b4 - <rustc_middle[c43c5dddfafcfdf0]::hir::provide::{closure#3} as core[c7f008e1dcb6080]::ops::function::FnOnce<(rustc_middle[c43c5dddfafcfdf0]::ty::context::TyCtxt, rustc_span[5a327fbd7b70632c]::def_id::LocalDefId)>>::call_once
  22:     0x7f1ddddfc611 - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::get_query::<rustc_query_impl[5eb223aa473b54b7]::queries::local_def_id_to_hir_id, rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt>
  23:     0x7f1dde253fa2 - <rustc_middle[c43c5dddfafcfdf0]::hir::provide::{closure#10} as core[c7f008e1dcb6080]::ops::function::FnOnce<(rustc_middle[c43c5dddfafcfdf0]::ty::context::TyCtxt, rustc_span[5a327fbd7b70632c]::def_id::DefId)>>::call_once
  24:     0x7f1dddde8896 - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::get_query::<rustc_query_impl[5eb223aa473b54b7]::queries::opt_def_kind, rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt>
  25:     0x7f1dde224838 - <rustc_middle[c43c5dddfafcfdf0]::ty::context::TyCtxt>::is_closure
  26:     0x7f1ddd9e02aa - rustc_resolve[b97cbacf285f9a51]::late::lifetimes::is_late_bound_map
  27:     0x7f1ddddbc6f4 - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::try_execute_query::<rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt, rustc_query_system[7e1ef711748c1dc0]::query::caches::DefaultCache<rustc_span[5a327fbd7b70632c]::def_id::LocalDefId, core[c7f008e1dcb6080]::option::Option<(rustc_span[5a327fbd7b70632c]::def_id::LocalDefId, &std[93bbb3cd3e7c1062]::collections::hash::set::HashSet<rustc_hir[9824cce51557701d]::hir_id::ItemLocalId, core[c7f008e1dcb6080]::hash::BuildHasherDefault<rustc_hash[37fe011e6ff56179]::FxHasher>>)>>>
  28:     0x7f1dddea4307 - <rustc_query_impl[5eb223aa473b54b7]::Queries as rustc_middle[c43c5dddfafcfdf0]::ty::query::QueryEngine>::is_late_bound_map
  29:     0x7f1dddbd326a - rustc_borrowck[5641079c818d078]::universal_regions::for_each_late_bound_region_defined_on::<<rustc_infer[130c9cf43637d4b6]::infer::InferCtxt as rustc_borrowck[5641079c818d078]::universal_regions::InferCtxtExt>::replace_late_bound_regions_with_nll_infer_vars::{closure#0}>
  30:     0x7f1dddbd0543 - <rustc_borrowck[5641079c818d078]::universal_regions::UniversalRegions>::new
  31:     0x7f1dddc3441d - rustc_borrowck[5641079c818d078]::do_mir_borrowck
  32:     0x7f1dddc295be - rustc_borrowck[5641079c818d078]::mir_borrowck
  33:     0x7f1dddc26340 - <rustc_borrowck[5641079c818d078]::provide::{closure#0} as core[c7f008e1dcb6080]::ops::function::FnOnce<(rustc_middle[c43c5dddfafcfdf0]::ty::context::TyCtxt, rustc_span[5a327fbd7b70632c]::def_id::LocalDefId)>>::call_once
  34:     0x7f1ddddc30f1 - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::try_execute_query::<rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt, rustc_query_system[7e1ef711748c1dc0]::query::caches::DefaultCache<rustc_span[5a327fbd7b70632c]::def_id::LocalDefId, &rustc_middle[c43c5dddfafcfdf0]::mir::query::BorrowCheckResult>>
  35:     0x7f1dddea214a - <rustc_query_impl[5eb223aa473b54b7]::Queries as rustc_middle[c43c5dddfafcfdf0]::ty::query::QueryEngine>::mir_borrowck
  36:     0x7f1dde22a4e8 - <rustc_middle[c43c5dddfafcfdf0]::ty::context::TyCtxt>::mir_borrowck_opt_const_arg
  37:     0x7f1ddd82b5eb - rustc_mir_transform[f1d52bfabc7c3bf9]::mir_drops_elaborated_and_const_checked
  38:     0x7f1ddddb1090 - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::try_execute_query::<rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt, rustc_query_system[7e1ef711748c1dc0]::query::caches::DefaultCache<rustc_middle[c43c5dddfafcfdf0]::ty::WithOptConstParam<rustc_span[5a327fbd7b70632c]::def_id::LocalDefId>, &rustc_data_structures[4e1b415330f15730]::steal::Steal<rustc_middle[c43c5dddfafcfdf0]::mir::Body>>>
  39:     0x7f1dddea0a28 - <rustc_query_impl[5eb223aa473b54b7]::Queries as rustc_middle[c43c5dddfafcfdf0]::ty::query::QueryEngine>::mir_drops_elaborated_and_const_checked
  40:     0x7f1dde543084 - rustc_mir_transform[f1d52bfabc7c3bf9]::inner_mir_for_ctfe
  41:     0x7f1dde54290c - rustc_mir_transform[f1d52bfabc7c3bf9]::mir_for_ctfe
  42:     0x7f1ddddd44f4 - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::try_execute_query::<rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt, rustc_query_system[7e1ef711748c1dc0]::query::caches::DefaultCache<rustc_span[5a327fbd7b70632c]::def_id::DefId, &rustc_middle[c43c5dddfafcfdf0]::mir::Body>>
  43:     0x7f1dde880b5c - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::get_query::<rustc_query_impl[5eb223aa473b54b7]::queries::mir_for_ctfe, rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt>
  44:     0x7f1dde7bc576 - <rustc_const_eval[16a173d9cf1d9ac9]::interpret::eval_context::InterpCx<rustc_const_eval[16a173d9cf1d9ac9]::const_eval::machine::CompileTimeInterpreter>>::load_mir
  45:     0x7f1dddd80b22 - rustc_const_eval[16a173d9cf1d9ac9]::const_eval::eval_queries::eval_to_allocation_raw_provider
  46:     0x7f1ddddab290 - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::try_execute_query::<rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt, rustc_query_system[7e1ef711748c1dc0]::query::caches::DefaultCache<rustc_middle[c43c5dddfafcfdf0]::ty::ParamEnvAnd<rustc_middle[c43c5dddfafcfdf0]::mir::interpret::GlobalId>, core[c7f008e1dcb6080]::result::Result<rustc_middle[c43c5dddfafcfdf0]::mir::interpret::value::ConstAlloc, rustc_middle[c43c5dddfafcfdf0]::mir::interpret::error::ErrorHandled>>>
  47:     0x7f1dddea2293 - <rustc_query_impl[5eb223aa473b54b7]::Queries as rustc_middle[c43c5dddfafcfdf0]::ty::query::QueryEngine>::eval_to_allocation_raw
  48:     0x7f1dddd7f96a - rustc_const_eval[16a173d9cf1d9ac9]::const_eval::eval_queries::eval_to_const_value_raw_provider
  49:     0x7f1ddddac38d - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::try_execute_query::<rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt, rustc_query_system[7e1ef711748c1dc0]::query::caches::DefaultCache<rustc_middle[c43c5dddfafcfdf0]::ty::ParamEnvAnd<rustc_middle[c43c5dddfafcfdf0]::mir::interpret::GlobalId>, core[c7f008e1dcb6080]::result::Result<rustc_middle[c43c5dddfafcfdf0]::mir::interpret::value::ConstValue, rustc_middle[c43c5dddfafcfdf0]::mir::interpret::error::ErrorHandled>>>
  50:     0x7f1dddea243f - <rustc_query_impl[5eb223aa473b54b7]::Queries as rustc_middle[c43c5dddfafcfdf0]::ty::query::QueryEngine>::eval_to_const_value_raw
  51:     0x7f1dddd7f6a4 - rustc_const_eval[16a173d9cf1d9ac9]::const_eval::eval_queries::eval_to_const_value_raw_provider
  52:     0x7f1ddddac38d - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::try_execute_query::<rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt, rustc_query_system[7e1ef711748c1dc0]::query::caches::DefaultCache<rustc_middle[c43c5dddfafcfdf0]::ty::ParamEnvAnd<rustc_middle[c43c5dddfafcfdf0]::mir::interpret::GlobalId>, core[c7f008e1dcb6080]::result::Result<rustc_middle[c43c5dddfafcfdf0]::mir::interpret::value::ConstValue, rustc_middle[c43c5dddfafcfdf0]::mir::interpret::error::ErrorHandled>>>
  53:     0x7f1dddea243f - <rustc_query_impl[5eb223aa473b54b7]::Queries as rustc_middle[c43c5dddfafcfdf0]::ty::query::QueryEngine>::eval_to_const_value_raw
  54:     0x7f1dde220d61 - <rustc_middle[c43c5dddfafcfdf0]::ty::context::TyCtxt>::const_eval_global_id
  55:     0x7f1ddeba7041 - <rustc_middle[c43c5dddfafcfdf0]::ty::context::TyCtxt>::const_eval_resolve
  56:     0x7f1ddeb166d2 - <rustc_trait_selection[d05df1b49be1ed2e]::traits::project::AssocTypeNormalizer as rustc_middle[c43c5dddfafcfdf0]::ty::fold::TypeFolder>::fold_const
  57:     0x7f1dde0e30bf - <rustc_trait_selection[d05df1b49be1ed2e]::traits::project::AssocTypeNormalizer as rustc_middle[c43c5dddfafcfdf0]::ty::fold::TypeFolder>::fold_ty
  58:     0x7f1ddd9b6da8 - <rustc_typeck[435f3367231454a0]::check::inherited::Inherited>::normalize_associated_types_in_with_cause::<rustc_middle[c43c5dddfafcfdf0]::ty::Ty>
  59:     0x7f1ddd94b636 - <&mut rustc_typeck[435f3367231454a0]::check::wfcheck::check_fn_or_method::{closure#0} as core[c7f008e1dcb6080]::ops::function::FnOnce<((usize, rustc_middle[c43c5dddfafcfdf0]::ty::Ty),)>>::call_once
  60:     0x7f1ddd974cde - <rustc_middle[c43c5dddfafcfdf0]::ty::Ty as rustc_middle[c43c5dddfafcfdf0]::ty::context::InternIteratorElement<rustc_middle[c43c5dddfafcfdf0]::ty::Ty, &rustc_middle[c43c5dddfafcfdf0]::ty::list::List<rustc_middle[c43c5dddfafcfdf0]::ty::Ty>>>::intern_with::<core[c7f008e1dcb6080]::iter::adapters::map::Map<core[c7f008e1dcb6080]::iter::adapters::enumerate::Enumerate<core[c7f008e1dcb6080]::iter::adapters::copied::Copied<core[c7f008e1dcb6080]::slice::iter::Iter<rustc_middle[c43c5dddfafcfdf0]::ty::Ty>>>, rustc_typeck[435f3367231454a0]::check::wfcheck::check_fn_or_method::{closure#0}>, <rustc_middle[c43c5dddfafcfdf0]::ty::context::TyCtxt>::mk_type_list<core[c7f008e1dcb6080]::iter::adapters::map::Map<core[c7f008e1dcb6080]::iter::adapters::enumerate::Enumerate<core[c7f008e1dcb6080]::iter::adapters::copied::Copied<core[c7f008e1dcb6080]::slice::iter::Iter<rustc_middle[c43c5dddfafcfdf0]::ty::Ty>>>, rustc_typeck[435f3367231454a0]::check::wfcheck::check_fn_or_method::{closure#0}>>::{closure#0}>
  61:     0x7f1ddd96a242 - rustc_typeck[435f3367231454a0]::check::wfcheck::check_fn_or_method
  62:     0x7f1ddd93135c - <rustc_infer[130c9cf43637d4b6]::infer::InferCtxtBuilder>::enter::<(), <rustc_typeck[435f3367231454a0]::check::inherited::InheritedBuilder>::enter<<rustc_typeck[435f3367231454a0]::check::wfcheck::CheckWfFcxBuilder>::with_fcx<rustc_typeck[435f3367231454a0]::check::wfcheck::check_associated_item::{closure#0}>::{closure#0}, ()>::{closure#0}>
  63:     0x7f1ddd967bad - rustc_typeck[435f3367231454a0]::check::wfcheck::check_associated_item
  64:     0x7f1dde632e7e - rustc_typeck[435f3367231454a0]::check::wfcheck::check_trait_item
  65:     0x7f1ddddc510e - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::try_execute_query::<rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt, rustc_query_system[7e1ef711748c1dc0]::query::caches::DefaultCache<rustc_span[5a327fbd7b70632c]::def_id::LocalDefId, ()>>
  66:     0x7f1dde8901a3 - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::get_query::<rustc_query_impl[5eb223aa473b54b7]::queries::check_trait_item_well_formed, rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt>
  67:     0x7f1ddd938408 - rustc_data_structures[4e1b415330f15730]::sync::par_for_each_in::<&alloc[d5198a32ac1e7cdc]::vec::Vec<rustc_hir[9824cce51557701d]::hir::MaybeOwner<&rustc_hir[9824cce51557701d]::hir::OwnerInfo>>, <rustc_middle[c43c5dddfafcfdf0]::hir::map::Map>::par_visit_all_item_likes<rustc_typeck[435f3367231454a0]::check::wfcheck::CheckTypeWellFormedVisitor>::{closure#0}>
  68:     0x7f1dde613b72 - <rustc_session[62db8dbcb5f03131]::session::Session>::track_errors::<rustc_typeck[435f3367231454a0]::check_crate::{closure#5}, ()>
  69:     0x7f1dde610b4b - rustc_typeck[435f3367231454a0]::check_crate
  70:     0x7f1dde3978f7 - rustc_interface[a6e240183aba3d57]::passes::analysis
  71:     0x7f1dde85428e - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::try_execute_query::<rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt, rustc_query_system[7e1ef711748c1dc0]::query::caches::DefaultCache<(), core[c7f008e1dcb6080]::result::Result<(), rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>>>
  72:     0x7f1dde89566e - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::get_query::<rustc_query_impl[5eb223aa473b54b7]::queries::analysis, rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt>
  73:     0x7f1dde3732a7 - <rustc_interface[a6e240183aba3d57]::passes::QueryContext>::enter::<rustc_driver[dfa02f50b2a2e61e]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[c7f008e1dcb6080]::result::Result<(), rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>>
  74:     0x7f1dde350cb8 - <rustc_interface[a6e240183aba3d57]::interface::Compiler>::enter::<rustc_driver[dfa02f50b2a2e61e]::run_compiler::{closure#1}::{closure#2}, core[c7f008e1dcb6080]::result::Result<core[c7f008e1dcb6080]::option::Option<rustc_interface[a6e240183aba3d57]::queries::Linker>, rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>>
  75:     0x7f1dde363d0f - rustc_span[5a327fbd7b70632c]::with_source_map::<core[c7f008e1dcb6080]::result::Result<(), rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>, rustc_interface[a6e240183aba3d57]::interface::create_compiler_and_run<core[c7f008e1dcb6080]::result::Result<(), rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>, rustc_driver[dfa02f50b2a2e61e]::run_compiler::{closure#1}>::{closure#1}>
  76:     0x7f1dde362b94 - rustc_interface[a6e240183aba3d57]::interface::create_compiler_and_run::<core[c7f008e1dcb6080]::result::Result<(), rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>, rustc_driver[dfa02f50b2a2e61e]::run_compiler::{closure#1}>
  77:     0x7f1dde34e6b2 - <scoped_tls[3e920f98e8d1f9d2]::ScopedKey<rustc_span[5a327fbd7b70632c]::SessionGlobals>>::set::<rustc_interface[a6e240183aba3d57]::interface::run_compiler<core[c7f008e1dcb6080]::result::Result<(), rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>, rustc_driver[dfa02f50b2a2e61e]::run_compiler::{closure#1}>::{closure#0}, core[c7f008e1dcb6080]::result::Result<(), rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>>
  78:     0x7f1dde34ca1f - std[93bbb3cd3e7c1062]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[a6e240183aba3d57]::util::run_in_thread_pool_with_globals<rustc_interface[a6e240183aba3d57]::interface::run_compiler<core[c7f008e1dcb6080]::result::Result<(), rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>, rustc_driver[dfa02f50b2a2e61e]::run_compiler::{closure#1}>::{closure#0}, core[c7f008e1dcb6080]::result::Result<(), rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>>::{closure#0}, core[c7f008e1dcb6080]::result::Result<(), rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>>
  79:     0x7f1dde364ca2 - <<std[93bbb3cd3e7c1062]::thread::Builder>::spawn_unchecked_<rustc_interface[a6e240183aba3d57]::util::run_in_thread_pool_with_globals<rustc_interface[a6e240183aba3d57]::interface::run_compiler<core[c7f008e1dcb6080]::result::Result<(), rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>, rustc_driver[dfa02f50b2a2e61e]::run_compiler::{closure#1}>::{closure#0}, core[c7f008e1dcb6080]::result::Result<(), rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>>::{closure#0}, core[c7f008e1dcb6080]::result::Result<(), rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>>::{closure#1} as core[c7f008e1dcb6080]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  80:     0x7f1ddbcaaf83 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hd51c3662b34e3fa5
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/alloc/src/boxed.rs:1861:9
  81:     0x7f1ddbcaaf83 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hb373dd9df6b8a0f7
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/alloc/src/boxed.rs:1861:9
  82:     0x7f1ddbcaaf83 - std::sys::unix::thread::Thread::new::thread_start::h987e16b384dce900
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/std/src/sys/unix/thread.rs:108:17
  83:     0x7f1ddba835c2 - start_thread
  84:     0x7f1ddbb08584 - __clone
  85:                0x0 - <unknown>

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.61.0-nightly (63b8f01bb 2022-03-24) running on x86_64-unknown-linux-gnu

query stack during panic:
thread 'rustc' panicked at 'already borrowed: BorrowMutError', /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/compiler/rustc_data_structures/src/sync.rs:423:16
stack backtrace:
   0:     0x7f1ddbc9d55d - std::backtrace_rs::backtrace::libunwind::trace::h2d2403a4858e54e0
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f1ddbc9d55d - std::backtrace_rs::backtrace::trace_unsynchronized::h19488f91fb99335d
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f1ddbc9d55d - std::sys_common::backtrace::_print_fmt::hc7dc3caa1b1fa1a8
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7f1ddbc9d55d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hdd9bf0d62a609be4
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7f1ddbcf755c - core::fmt::write::h5aa356cee5fb9fa9
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/core/src/fmt/mod.rs:1190:17
   5:     0x7f1ddbc8eb51 - std::io::Write::write_fmt::h5f1c72988edc233a
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/std/src/io/mod.rs:1655:15
   6:     0x7f1ddbca0645 - std::sys_common::backtrace::_print::hf7422c13ad711003
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7f1ddbca0645 - std::sys_common::backtrace::print::hd1d7cd277e511da8
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7f1ddbca0645 - std::panicking::default_hook::{{closure}}::h197cc907105123d7
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/std/src/panicking.rs:295:22
   9:     0x7f1ddbca02f9 - std::panicking::default_hook::h1359dace8bca1122
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/std/src/panicking.rs:314:9
  10:     0x7f1ddc4ce2e1 - rustc_driver[dfa02f50b2a2e61e]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f1ddbca0d90 - std::panicking::rust_panic_with_hook::h6964c34f5177236d
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/std/src/panicking.rs:702:17
  12:     0x7f1ddbca0bc7 - std::panicking::begin_panic_handler::{{closure}}::h2b0f06ed58a8b0da
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/std/src/panicking.rs:588:13
  13:     0x7f1ddbc9da14 - std::sys_common::backtrace::__rust_end_short_backtrace::hfd4ffd0c502a3322
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/std/src/sys_common/backtrace.rs:138:18
  14:     0x7f1ddbca08f9 - rust_begin_unwind
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/std/src/panicking.rs:584:5
  15:     0x7f1ddbc649f3 - core::panicking::panic_fmt::h7de8a917d4af5b16
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/core/src/panicking.rs:143:14
  16:     0x7f1ddbc64ae3 - core::result::unwrap_failed::hd4800bf00e7525fe
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/core/src/result.rs:1785:5
  17:     0x7f1ddddfd24b - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::get_query::<rustc_query_impl[5eb223aa473b54b7]::queries::local_def_id_to_hir_id, rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt>
  18:     0x7f1dde2534bd - <rustc_middle[c43c5dddfafcfdf0]::hir::provide::{closure#8} as core[c7f008e1dcb6080]::ops::function::FnOnce<(rustc_middle[c43c5dddfafcfdf0]::ty::context::TyCtxt, rustc_span[5a327fbd7b70632c]::def_id::DefId)>>::call_once
  19:     0x7f1ddde058fa - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::get_query::<rustc_query_impl[5eb223aa473b54b7]::queries::def_span, rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt>
  20:     0x7f1dddea27ee - <rustc_query_impl[5eb223aa473b54b7]::Queries as rustc_middle[c43c5dddfafcfdf0]::ty::query::QueryEngine>::def_span
  21:     0x7f1ddce8d8a0 - <rustc_span[5a327fbd7b70632c]::def_id::DefId as rustc_query_impl[5eb223aa473b54b7]::keys::Key>::default_span
  22:     0x7f1ddce8d795 - <rustc_span[5a327fbd7b70632c]::def_id::LocalDefId as rustc_query_impl[5eb223aa473b54b7]::keys::Key>::default_span
  23:     0x7f1ddcedccfd - rustc_query_impl[5eb223aa473b54b7]::make_query::local_def_id_to_hir_id
  24:     0x7f1ddcd1a975 - <rustc_query_system[7e1ef711748c1dc0]::query::plumbing::QueryState<rustc_span[5a327fbd7b70632c]::def_id::LocalDefId>>::try_collect_active_jobs::<rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt>
  25:     0x7f1ddcf2aac0 - <rustc_query_impl[5eb223aa473b54b7]::Queries>::try_collect_active_jobs
  26:     0x7f1ddce8d3be - <rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt>::try_print_query_stack
  27:     0x7f1ddc5c54a2 - rustc_interface[a6e240183aba3d57]::interface::try_print_query_stack
  28:     0x7f1ddc4cefa5 - rustc_driver[dfa02f50b2a2e61e]::report_ice
  29:     0x7f1ddbca0d90 - std::panicking::rust_panic_with_hook::h6964c34f5177236d
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/std/src/panicking.rs:702:17
  30:     0x7f1ddd5751f1 - std[93bbb3cd3e7c1062]::panicking::begin_panic::<rustc_errors[b882cf8cc0f2d9b3]::ExplicitBug>::{closure#0}
  31:     0x7f1ddd5750b6 - std[93bbb3cd3e7c1062]::sys_common::backtrace::__rust_end_short_backtrace::<std[93bbb3cd3e7c1062]::panicking::begin_panic<rustc_errors[b882cf8cc0f2d9b3]::ExplicitBug>::{closure#0}, !>
  32:     0x7f1ddd57bfff - std[93bbb3cd3e7c1062]::panicking::begin_panic::<rustc_errors[b882cf8cc0f2d9b3]::ExplicitBug>
  33:     0x7f1ddd588f16 - std[93bbb3cd3e7c1062]::panic::panic_any::<rustc_errors[b882cf8cc0f2d9b3]::ExplicitBug>
  34:     0x7f1ddd58a6f3 - <rustc_errors[b882cf8cc0f2d9b3]::HandlerInner>::bug
  35:     0x7f1ddd58a150 - <rustc_errors[b882cf8cc0f2d9b3]::Handler>::bug
  36:     0x7f1ddd4c68b6 - rustc_middle[c43c5dddfafcfdf0]::ty::context::tls::with_opt::<rustc_middle[c43c5dddfafcfdf0]::util::bug::opt_span_bug_fmt<rustc_span[5a327fbd7b70632c]::span_encoding::Span>::{closure#0}, ()>
  37:     0x7f1ddd4c9946 - rustc_middle[c43c5dddfafcfdf0]::util::bug::opt_span_bug_fmt::<rustc_span[5a327fbd7b70632c]::span_encoding::Span>
  38:     0x7f1ddd4c98b3 - rustc_middle[c43c5dddfafcfdf0]::util::bug::bug_fmt
  39:     0x7f1dde2523b4 - <rustc_middle[c43c5dddfafcfdf0]::hir::provide::{closure#3} as core[c7f008e1dcb6080]::ops::function::FnOnce<(rustc_middle[c43c5dddfafcfdf0]::ty::context::TyCtxt, rustc_span[5a327fbd7b70632c]::def_id::LocalDefId)>>::call_once
  40:     0x7f1ddddfc611 - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::get_query::<rustc_query_impl[5eb223aa473b54b7]::queries::local_def_id_to_hir_id, rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt>
  41:     0x7f1dde253fa2 - <rustc_middle[c43c5dddfafcfdf0]::hir::provide::{closure#10} as core[c7f008e1dcb6080]::ops::function::FnOnce<(rustc_middle[c43c5dddfafcfdf0]::ty::context::TyCtxt, rustc_span[5a327fbd7b70632c]::def_id::DefId)>>::call_once
  42:     0x7f1dddde8896 - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::get_query::<rustc_query_impl[5eb223aa473b54b7]::queries::opt_def_kind, rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt>
  43:     0x7f1dde224838 - <rustc_middle[c43c5dddfafcfdf0]::ty::context::TyCtxt>::is_closure
  44:     0x7f1ddd9e02aa - rustc_resolve[b97cbacf285f9a51]::late::lifetimes::is_late_bound_map
  45:     0x7f1ddddbc6f4 - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::try_execute_query::<rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt, rustc_query_system[7e1ef711748c1dc0]::query::caches::DefaultCache<rustc_span[5a327fbd7b70632c]::def_id::LocalDefId, core[c7f008e1dcb6080]::option::Option<(rustc_span[5a327fbd7b70632c]::def_id::LocalDefId, &std[93bbb3cd3e7c1062]::collections::hash::set::HashSet<rustc_hir[9824cce51557701d]::hir_id::ItemLocalId, core[c7f008e1dcb6080]::hash::BuildHasherDefault<rustc_hash[37fe011e6ff56179]::FxHasher>>)>>>
  46:     0x7f1dddea4307 - <rustc_query_impl[5eb223aa473b54b7]::Queries as rustc_middle[c43c5dddfafcfdf0]::ty::query::QueryEngine>::is_late_bound_map
  47:     0x7f1dddbd326a - rustc_borrowck[5641079c818d078]::universal_regions::for_each_late_bound_region_defined_on::<<rustc_infer[130c9cf43637d4b6]::infer::InferCtxt as rustc_borrowck[5641079c818d078]::universal_regions::InferCtxtExt>::replace_late_bound_regions_with_nll_infer_vars::{closure#0}>
  48:     0x7f1dddbd0543 - <rustc_borrowck[5641079c818d078]::universal_regions::UniversalRegions>::new
  49:     0x7f1dddc3441d - rustc_borrowck[5641079c818d078]::do_mir_borrowck
  50:     0x7f1dddc295be - rustc_borrowck[5641079c818d078]::mir_borrowck
  51:     0x7f1dddc26340 - <rustc_borrowck[5641079c818d078]::provide::{closure#0} as core[c7f008e1dcb6080]::ops::function::FnOnce<(rustc_middle[c43c5dddfafcfdf0]::ty::context::TyCtxt, rustc_span[5a327fbd7b70632c]::def_id::LocalDefId)>>::call_once
  52:     0x7f1ddddc30f1 - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::try_execute_query::<rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt, rustc_query_system[7e1ef711748c1dc0]::query::caches::DefaultCache<rustc_span[5a327fbd7b70632c]::def_id::LocalDefId, &rustc_middle[c43c5dddfafcfdf0]::mir::query::BorrowCheckResult>>
  53:     0x7f1dddea214a - <rustc_query_impl[5eb223aa473b54b7]::Queries as rustc_middle[c43c5dddfafcfdf0]::ty::query::QueryEngine>::mir_borrowck
  54:     0x7f1dde22a4e8 - <rustc_middle[c43c5dddfafcfdf0]::ty::context::TyCtxt>::mir_borrowck_opt_const_arg
  55:     0x7f1ddd82b5eb - rustc_mir_transform[f1d52bfabc7c3bf9]::mir_drops_elaborated_and_const_checked
  56:     0x7f1ddddb1090 - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::try_execute_query::<rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt, rustc_query_system[7e1ef711748c1dc0]::query::caches::DefaultCache<rustc_middle[c43c5dddfafcfdf0]::ty::WithOptConstParam<rustc_span[5a327fbd7b70632c]::def_id::LocalDefId>, &rustc_data_structures[4e1b415330f15730]::steal::Steal<rustc_middle[c43c5dddfafcfdf0]::mir::Body>>>
  57:     0x7f1dddea0a28 - <rustc_query_impl[5eb223aa473b54b7]::Queries as rustc_middle[c43c5dddfafcfdf0]::ty::query::QueryEngine>::mir_drops_elaborated_and_const_checked
  58:     0x7f1dde543084 - rustc_mir_transform[f1d52bfabc7c3bf9]::inner_mir_for_ctfe
  59:     0x7f1dde54290c - rustc_mir_transform[f1d52bfabc7c3bf9]::mir_for_ctfe
  60:     0x7f1ddddd44f4 - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::try_execute_query::<rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt, rustc_query_system[7e1ef711748c1dc0]::query::caches::DefaultCache<rustc_span[5a327fbd7b70632c]::def_id::DefId, &rustc_middle[c43c5dddfafcfdf0]::mir::Body>>
  61:     0x7f1dde880b5c - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::get_query::<rustc_query_impl[5eb223aa473b54b7]::queries::mir_for_ctfe, rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt>
  62:     0x7f1dde7bc576 - <rustc_const_eval[16a173d9cf1d9ac9]::interpret::eval_context::InterpCx<rustc_const_eval[16a173d9cf1d9ac9]::const_eval::machine::CompileTimeInterpreter>>::load_mir
  63:     0x7f1dddd80b22 - rustc_const_eval[16a173d9cf1d9ac9]::const_eval::eval_queries::eval_to_allocation_raw_provider
  64:     0x7f1ddddab290 - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::try_execute_query::<rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt, rustc_query_system[7e1ef711748c1dc0]::query::caches::DefaultCache<rustc_middle[c43c5dddfafcfdf0]::ty::ParamEnvAnd<rustc_middle[c43c5dddfafcfdf0]::mir::interpret::GlobalId>, core[c7f008e1dcb6080]::result::Result<rustc_middle[c43c5dddfafcfdf0]::mir::interpret::value::ConstAlloc, rustc_middle[c43c5dddfafcfdf0]::mir::interpret::error::ErrorHandled>>>
  65:     0x7f1dddea2293 - <rustc_query_impl[5eb223aa473b54b7]::Queries as rustc_middle[c43c5dddfafcfdf0]::ty::query::QueryEngine>::eval_to_allocation_raw
  66:     0x7f1dddd7f96a - rustc_const_eval[16a173d9cf1d9ac9]::const_eval::eval_queries::eval_to_const_value_raw_provider
  67:     0x7f1ddddac38d - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::try_execute_query::<rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt, rustc_query_system[7e1ef711748c1dc0]::query::caches::DefaultCache<rustc_middle[c43c5dddfafcfdf0]::ty::ParamEnvAnd<rustc_middle[c43c5dddfafcfdf0]::mir::interpret::GlobalId>, core[c7f008e1dcb6080]::result::Result<rustc_middle[c43c5dddfafcfdf0]::mir::interpret::value::ConstValue, rustc_middle[c43c5dddfafcfdf0]::mir::interpret::error::ErrorHandled>>>
  68:     0x7f1dddea243f - <rustc_query_impl[5eb223aa473b54b7]::Queries as rustc_middle[c43c5dddfafcfdf0]::ty::query::QueryEngine>::eval_to_const_value_raw
  69:     0x7f1dddd7f6a4 - rustc_const_eval[16a173d9cf1d9ac9]::const_eval::eval_queries::eval_to_const_value_raw_provider
  70:     0x7f1ddddac38d - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::try_execute_query::<rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt, rustc_query_system[7e1ef711748c1dc0]::query::caches::DefaultCache<rustc_middle[c43c5dddfafcfdf0]::ty::ParamEnvAnd<rustc_middle[c43c5dddfafcfdf0]::mir::interpret::GlobalId>, core[c7f008e1dcb6080]::result::Result<rustc_middle[c43c5dddfafcfdf0]::mir::interpret::value::ConstValue, rustc_middle[c43c5dddfafcfdf0]::mir::interpret::error::ErrorHandled>>>
  71:     0x7f1dddea243f - <rustc_query_impl[5eb223aa473b54b7]::Queries as rustc_middle[c43c5dddfafcfdf0]::ty::query::QueryEngine>::eval_to_const_value_raw
  72:     0x7f1dde220d61 - <rustc_middle[c43c5dddfafcfdf0]::ty::context::TyCtxt>::const_eval_global_id
  73:     0x7f1ddeba7041 - <rustc_middle[c43c5dddfafcfdf0]::ty::context::TyCtxt>::const_eval_resolve
  74:     0x7f1ddeb166d2 - <rustc_trait_selection[d05df1b49be1ed2e]::traits::project::AssocTypeNormalizer as rustc_middle[c43c5dddfafcfdf0]::ty::fold::TypeFolder>::fold_const
  75:     0x7f1dde0e30bf - <rustc_trait_selection[d05df1b49be1ed2e]::traits::project::AssocTypeNormalizer as rustc_middle[c43c5dddfafcfdf0]::ty::fold::TypeFolder>::fold_ty
  76:     0x7f1ddd9b6da8 - <rustc_typeck[435f3367231454a0]::check::inherited::Inherited>::normalize_associated_types_in_with_cause::<rustc_middle[c43c5dddfafcfdf0]::ty::Ty>
  77:     0x7f1ddd94b636 - <&mut rustc_typeck[435f3367231454a0]::check::wfcheck::check_fn_or_method::{closure#0} as core[c7f008e1dcb6080]::ops::function::FnOnce<((usize, rustc_middle[c43c5dddfafcfdf0]::ty::Ty),)>>::call_once
  78:     0x7f1ddd974cde - <rustc_middle[c43c5dddfafcfdf0]::ty::Ty as rustc_middle[c43c5dddfafcfdf0]::ty::context::InternIteratorElement<rustc_middle[c43c5dddfafcfdf0]::ty::Ty, &rustc_middle[c43c5dddfafcfdf0]::ty::list::List<rustc_middle[c43c5dddfafcfdf0]::ty::Ty>>>::intern_with::<core[c7f008e1dcb6080]::iter::adapters::map::Map<core[c7f008e1dcb6080]::iter::adapters::enumerate::Enumerate<core[c7f008e1dcb6080]::iter::adapters::copied::Copied<core[c7f008e1dcb6080]::slice::iter::Iter<rustc_middle[c43c5dddfafcfdf0]::ty::Ty>>>, rustc_typeck[435f3367231454a0]::check::wfcheck::check_fn_or_method::{closure#0}>, <rustc_middle[c43c5dddfafcfdf0]::ty::context::TyCtxt>::mk_type_list<core[c7f008e1dcb6080]::iter::adapters::map::Map<core[c7f008e1dcb6080]::iter::adapters::enumerate::Enumerate<core[c7f008e1dcb6080]::iter::adapters::copied::Copied<core[c7f008e1dcb6080]::slice::iter::Iter<rustc_middle[c43c5dddfafcfdf0]::ty::Ty>>>, rustc_typeck[435f3367231454a0]::check::wfcheck::check_fn_or_method::{closure#0}>>::{closure#0}>
  79:     0x7f1ddd96a242 - rustc_typeck[435f3367231454a0]::check::wfcheck::check_fn_or_method
  80:     0x7f1ddd93135c - <rustc_infer[130c9cf43637d4b6]::infer::InferCtxtBuilder>::enter::<(), <rustc_typeck[435f3367231454a0]::check::inherited::InheritedBuilder>::enter<<rustc_typeck[435f3367231454a0]::check::wfcheck::CheckWfFcxBuilder>::with_fcx<rustc_typeck[435f3367231454a0]::check::wfcheck::check_associated_item::{closure#0}>::{closure#0}, ()>::{closure#0}>
  81:     0x7f1ddd967bad - rustc_typeck[435f3367231454a0]::check::wfcheck::check_associated_item
  82:     0x7f1dde632e7e - rustc_typeck[435f3367231454a0]::check::wfcheck::check_trait_item
  83:     0x7f1ddddc510e - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::try_execute_query::<rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt, rustc_query_system[7e1ef711748c1dc0]::query::caches::DefaultCache<rustc_span[5a327fbd7b70632c]::def_id::LocalDefId, ()>>
  84:     0x7f1dde8901a3 - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::get_query::<rustc_query_impl[5eb223aa473b54b7]::queries::check_trait_item_well_formed, rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt>
  85:     0x7f1ddd938408 - rustc_data_structures[4e1b415330f15730]::sync::par_for_each_in::<&alloc[d5198a32ac1e7cdc]::vec::Vec<rustc_hir[9824cce51557701d]::hir::MaybeOwner<&rustc_hir[9824cce51557701d]::hir::OwnerInfo>>, <rustc_middle[c43c5dddfafcfdf0]::hir::map::Map>::par_visit_all_item_likes<rustc_typeck[435f3367231454a0]::check::wfcheck::CheckTypeWellFormedVisitor>::{closure#0}>
  86:     0x7f1dde613b72 - <rustc_session[62db8dbcb5f03131]::session::Session>::track_errors::<rustc_typeck[435f3367231454a0]::check_crate::{closure#5}, ()>
  87:     0x7f1dde610b4b - rustc_typeck[435f3367231454a0]::check_crate
  88:     0x7f1dde3978f7 - rustc_interface[a6e240183aba3d57]::passes::analysis
  89:     0x7f1dde85428e - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::try_execute_query::<rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt, rustc_query_system[7e1ef711748c1dc0]::query::caches::DefaultCache<(), core[c7f008e1dcb6080]::result::Result<(), rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>>>
  90:     0x7f1dde89566e - rustc_query_system[7e1ef711748c1dc0]::query::plumbing::get_query::<rustc_query_impl[5eb223aa473b54b7]::queries::analysis, rustc_query_impl[5eb223aa473b54b7]::plumbing::QueryCtxt>
  91:     0x7f1dde3732a7 - <rustc_interface[a6e240183aba3d57]::passes::QueryContext>::enter::<rustc_driver[dfa02f50b2a2e61e]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[c7f008e1dcb6080]::result::Result<(), rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>>
  92:     0x7f1dde350cb8 - <rustc_interface[a6e240183aba3d57]::interface::Compiler>::enter::<rustc_driver[dfa02f50b2a2e61e]::run_compiler::{closure#1}::{closure#2}, core[c7f008e1dcb6080]::result::Result<core[c7f008e1dcb6080]::option::Option<rustc_interface[a6e240183aba3d57]::queries::Linker>, rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>>
  93:     0x7f1dde363d0f - rustc_span[5a327fbd7b70632c]::with_source_map::<core[c7f008e1dcb6080]::result::Result<(), rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>, rustc_interface[a6e240183aba3d57]::interface::create_compiler_and_run<core[c7f008e1dcb6080]::result::Result<(), rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>, rustc_driver[dfa02f50b2a2e61e]::run_compiler::{closure#1}>::{closure#1}>
  94:     0x7f1dde362b94 - rustc_interface[a6e240183aba3d57]::interface::create_compiler_and_run::<core[c7f008e1dcb6080]::result::Result<(), rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>, rustc_driver[dfa02f50b2a2e61e]::run_compiler::{closure#1}>
  95:     0x7f1dde34e6b2 - <scoped_tls[3e920f98e8d1f9d2]::ScopedKey<rustc_span[5a327fbd7b70632c]::SessionGlobals>>::set::<rustc_interface[a6e240183aba3d57]::interface::run_compiler<core[c7f008e1dcb6080]::result::Result<(), rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>, rustc_driver[dfa02f50b2a2e61e]::run_compiler::{closure#1}>::{closure#0}, core[c7f008e1dcb6080]::result::Result<(), rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>>
  96:     0x7f1dde34ca1f - std[93bbb3cd3e7c1062]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[a6e240183aba3d57]::util::run_in_thread_pool_with_globals<rustc_interface[a6e240183aba3d57]::interface::run_compiler<core[c7f008e1dcb6080]::result::Result<(), rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>, rustc_driver[dfa02f50b2a2e61e]::run_compiler::{closure#1}>::{closure#0}, core[c7f008e1dcb6080]::result::Result<(), rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>>::{closure#0}, core[c7f008e1dcb6080]::result::Result<(), rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>>
  97:     0x7f1dde364ca2 - <<std[93bbb3cd3e7c1062]::thread::Builder>::spawn_unchecked_<rustc_interface[a6e240183aba3d57]::util::run_in_thread_pool_with_globals<rustc_interface[a6e240183aba3d57]::interface::run_compiler<core[c7f008e1dcb6080]::result::Result<(), rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>, rustc_driver[dfa02f50b2a2e61e]::run_compiler::{closure#1}>::{closure#0}, core[c7f008e1dcb6080]::result::Result<(), rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>>::{closure#0}, core[c7f008e1dcb6080]::result::Result<(), rustc_errors[b882cf8cc0f2d9b3]::ErrorGuaranteed>>::{closure#1} as core[c7f008e1dcb6080]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  98:     0x7f1ddbcaaf83 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hd51c3662b34e3fa5
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/alloc/src/boxed.rs:1861:9
  99:     0x7f1ddbcaaf83 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hb373dd9df6b8a0f7
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/alloc/src/boxed.rs:1861:9
 100:     0x7f1ddbcaaf83 - std::sys::unix::thread::Thread::new::thread_start::h987e16b384dce900
                               at /rustc/63b8f01bb5ca277e7df8d7efe094ed4244c1790c/library/std/src/sys/unix/thread.rs:108:17
 101:     0x7f1ddba835c2 - start_thread
 102:     0x7f1ddbb08584 - __clone
 103:                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.61.0-nightly (63b8f01bb 2022-03-24) running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack
thread panicked while panicking. aborting.

@matthiaskrgr matthiaskrgr 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 Mar 25, 2022
@compiler-errors
Copy link
Member

minimized:

pub trait C {
    async fn new() -> [u8; _];
}

@rustbot claim

@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label Mar 26, 2022
@compiler-errors
Copy link
Member

I am not sure if I am able to solve this ICE -- it has to do with the way that async fn in traits are treated as async fn in some places, but not lowered as async fn in other places. That means there's a DefId that is not associated with a HIR Id, but I can't exactly track it down.

@rustbot release-assignment

@spastorino
Copy link
Member

I'm working on a return position impl traits change that is going to make it easier to lowering return position impl traits in traits and that would make async fns in traits easy. All this is in my todo list. I should be able to accomplish some of these things soon.

@cjgillot not sure if you were going to work on this, but we can talk about this in Zulip if you want.

@JohnTitor
Copy link
Member

Triage: The ICE doesn't occur on the latest nightly, bisecting shows #97694 fixed it but I'm not 100% sure what PR did, perhaps #97471? Marking E-needs-test.

@JohnTitor JohnTitor added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Jun 4, 2022
JohnTitor added a commit to JohnTitor/rust that referenced this issue Jun 7, 2022
bors added a commit to rust-lang-ci/rust that referenced this issue Jun 8, 2022
…askrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#97829 (Add regresion test for rust-lang#95307)
 - rust-lang#97831 (Remove `AlwaysLiveLocals` wrapper struct)
 - rust-lang#97832 (Change `Direction::{is_forward,is_backward}` functions into constants)
 - rust-lang#97840 (RustWrapper: adapt to APInt API changes in LLVM 15)
 - rust-lang#97845 (Use more targeted suggestion when confusing i8 with std::i8)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors closed this as completed in 36e9cbc Jun 8, 2022
stlankes pushed a commit to hermit-os/rust that referenced this issue Jun 10, 2022
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. F-async_fn_in_trait Static async fn in traits glacier ICE tracked in rust-lang/glacier. 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.

6 participants