Skip to content

Internal compiler error with async, const generics, and ?-operator #84841

Closed
@ghost

Description

Code

async fn main() {
    // Adding an .await here avoids the ICE
    test()?;
}

// Removing the const generic parameter here avoids the ICE
async fn test<const N: usize>() {
}

Meta

rustc --version --verbose:

rustc 1.51.0 (2fd73fabe 2021-03-23)
binary: rustc
commit-hash: 2fd73fabe469357a12c2c974c140f67e7cdd76d0
commit-date: 2021-03-23
host: x86_64-pc-windows-gnu
release: 1.51.0
LLVM version: 11.0.1

The error also occurs on beta and nightly.

Error output

thread 'rustc' panicked at 'index out of bounds: the len is 0 but the index is 0', C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\ena-0.14.0\src\snapshot_vec.rs:199:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

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.51.0 (2fd73fabe 2021-03-23) running on x86_64-pc-windows-gnu

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

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

query stack during panic:
#0 [type_implements_trait] evaluating `type_implements_trait` `(DefId(2:9585 ~ core[2923]::future::future::Future), impl std::future::Future, [], ParamEnv { caller_bounds: [], reveal: UserFacing })`
#1 [typeck] type-checking `main`
end of query stack
Backtrace

thread 'rustc' panicked at 'index out of bounds: the len is 0 but the index is 0', C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\ena-0.14.0\src\snapshot_vec.rs:199:10
stack backtrace:
   0: rust_begin_unwind
             at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\std\src\panicking.rs:493:5
   1: core::panicking::panic_fmt
             at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\core\src\panicking.rs:92:14
   2: core::panicking::panic_bounds_check
             at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\core\src\panicking.rs:69:5
   3: ena::unify::UnificationTable<S>::probe_value
   4: <rustc_infer::infer::canonical::canonicalizer::Canonicalizer as rustc_middle::ty::fold::TypeFolder>::fold_const
   5: rustc_middle::ty::fold::TypeFoldable::fold_with
   6: <rustc_infer::infer::canonical::canonicalizer::Canonicalizer as rustc_middle::ty::fold::TypeFolder>::fold_ty
   7: rustc_middle::ty::fold::TypeFoldable::fold_with
   8: rustc_middle::ty::fold::TypeFoldable::fold_with
   9: rustc_middle::ty::fold::TypeFoldable::fold_with
  10: rustc_infer::infer::canonical::canonicalizer::Canonicalizer::canonicalize
  11: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation
  12: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation_no_overflow
  13: rustc_infer::infer::InferCtxtBuilder::enter
  14: rustc_trait_selection::traits::type_implements_trait
  15: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::type_implements_trait>::compute
  16: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  17: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  18: rustc_data_structures::stack::ensure_sufficient_stack
  19: rustc_query_system::query::plumbing::force_query_with_job
  20: rustc_query_system::query::plumbing::get_query_impl
  21: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::suggestions::InferCtxtExt>::suggest_await_before_try
  22: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtExt>::report_selection_error
  23: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtPrivExt>::report_fulfillment_error
  24: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtExt>::report_fulfillment_errors
  25: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_argument_types
  26: rustc_typeck::check::callee::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::confirm_builtin_call
  27: rustc_typeck::check::callee::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_call
  28: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
  29: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
  30: rustc_typeck::check::_match::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::demand_scrutinee_type
  31: rustc_typeck::check::_match::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_match
  32: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
  33: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
  34: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_stmt
  35: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
  36: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
  37: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
  38: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
  39: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
  40: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
  41: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
  42: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
  43: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_return_expr
  44: rustc_typeck::check::check::check_fn
  45: rustc_typeck::check::closure::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_closure
  46: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
  47: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
  48: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_argument_types
  49: rustc_typeck::check::callee::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::confirm_builtin_call
  50: rustc_typeck::check::callee::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_call
  51: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
  52: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
  53: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_return_expr
  54: rustc_typeck::check::check::check_fn
  55: rustc_infer::infer::InferCtxtBuilder::enter
  56: rustc_typeck::check::typeck
  57: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  58: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  59: rustc_data_structures::stack::ensure_sufficient_stack
  60: rustc_query_system::query::plumbing::force_query_with_job
  61: rustc_query_system::query::plumbing::get_query_impl
  62: rustc_middle::ty::context::TyCtxt::typeck_opt_const_arg
  63: rustc_mir_build::thir::cx::Cx::new
  64: rustc_infer::infer::InferCtxtBuilder::enter
  65: rustc_mir_build::build::mir_built
  66: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::mir_built>::compute
  67: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  68: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  69: rustc_data_structures::stack::ensure_sufficient_stack
  70: rustc_query_system::query::plumbing::force_query_with_job
  71: rustc_query_system::query::plumbing::get_query_impl
  72: rustc_mir::transform::check_unsafety::unsafety_check_result
  73: core::ops::function::FnOnce::call_once
  74: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::unsafety_check_result>::compute
  75: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  76: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  77: rustc_data_structures::stack::ensure_sufficient_stack
  78: rustc_query_system::query::plumbing::force_query_with_job
  79: rustc_query_system::query::plumbing::get_query_impl
  80: rustc_query_system::query::plumbing::ensure_query_impl
  81: rustc_mir::transform::mir_const
  82: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::mir_const>::compute
  83: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  84: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  85: rustc_data_structures::stack::ensure_sufficient_stack
  86: rustc_query_system::query::plumbing::force_query_with_job
  87: rustc_query_system::query::plumbing::get_query_impl
  88: rustc_mir::transform::mir_promoted
  89: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::mir_promoted>::compute
  90: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  91: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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.51.0 (2fd73fabe 2021-03-23) running on x86_64-pc-windows-gnu

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

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

query stack during panic:
#0 [type_implements_trait] evaluating `type_implements_trait` `(DefId(2:9585 ~ core[2923]::future::future::Future), impl std::future::Future, [], ParamEnv { caller_bounds: [], reveal: UserFacing })`
#1 [typeck] type-checking `main`
#2 [mir_built] building MIR for `main`
#3 [unsafety_check_result] unsafety-checking `main`
#4 [mir_const] processing MIR for `main`
#5 [mir_promoted] processing `main`
#6 [mir_borrowck] borrow-checking `main`
#7 [type_of] computing type of `main::{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
error: internal compiler error: trimmed_def_paths constructed
  |
  = note: delayed at    0: std::backtrace_rs::backtrace::dbghelp::trace
                       at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\std\src\..\..\backtrace\src\backtrace\dbghelp.rs:98:5
                std::backtrace_rs::backtrace::trace_unsynchronized
                       at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66:5
                std::backtrace::Backtrace::create
                       at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\std\src\backtrace.rs:327:13
             1: std::backtrace::Backtrace::force_capture
                       at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\std\src\backtrace.rs:310:9
             2: rustc_errors::Handler::delay_good_path_bug
             3: rustc_middle::ty::print::pretty::trimmed_def_paths
             4: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::trimmed_def_paths>::compute
             5: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
             6: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
             7: rustc_data_structures::stack::ensure_sufficient_stack
             8: rustc_query_system::query::plumbing::force_query_with_job
             9: rustc_query_system::query::plumbing::get_query_impl
            10: <rustc_middle::ty::print::pretty::FmtPrinter<F> as rustc_middle::ty::print::Printer>::print_def_path
            11: rustc_middle::ty::print::Printer::default_print_def_path
            12: <rustc_middle::ty::print::pretty::FmtPrinter<F> as rustc_middle::ty::print::Printer>::print_def_path
            13: <rustc_middle::ty::print::pretty::FmtPrinter<F> as rustc_middle::ty::print::pretty::PrettyPrinter>::in_binder
            14: std::thread::local::LocalKey<T>::with
            15: rustc_middle::ty::print::pretty::PrettyPrinter::pretty_print_type
            16: <rustc_middle::ty::print::pretty::FmtPrinter<F> as rustc_middle::ty::print::Printer>::print_type
            17: rustc_middle::ty::print::pretty::<impl core::fmt::Display for &rustc_middle::ty::TyS>::fmt
            18: core::fmt::write
                       at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\core\src\fmt\mod.rs:1096:17
            19: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::on_unimplemented::InferCtxtExt>::on_unimplemented_note
            20: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtExt>::report_selection_error
            21: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtPrivExt>::report_fulfillment_error
            22: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtExt>::report_fulfillment_errors
            23: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_argument_types
            24: rustc_typeck::check::callee::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::confirm_builtin_call
            25: rustc_typeck::check::callee::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_call
            26: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
            27: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
            28: rustc_typeck::check::_match::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::demand_scrutinee_type
            29: rustc_typeck::check::_match::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_match
            30: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
            31: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
            32: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_stmt
            33: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
            34: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
            35: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
            36: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
            37: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
            38: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
            39: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
            40: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
            41: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_return_expr
            42: rustc_typeck::check::check::check_fn
            43: rustc_typeck::check::closure::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_closure
            44: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
            45: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
            46: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_argument_types
            47: rustc_typeck::check::callee::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::confirm_builtin_call
            48: rustc_typeck::check::callee::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_call
            49: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
            50: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
            51: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_return_expr
            52: rustc_typeck::check::check::check_fn
            53: rustc_infer::infer::InferCtxtBuilder::enter
            54: rustc_typeck::check::typeck
            55: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
            56: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
            57: rustc_data_structures::stack::ensure_sufficient_stack
            58: rustc_query_system::query::plumbing::force_query_with_job
            59: rustc_query_system::query::plumbing::get_query_impl
            60: rustc_middle::ty::context::TyCtxt::typeck_opt_const_arg
            61: rustc_mir_build::thir::cx::Cx::new
            62: rustc_infer::infer::InferCtxtBuilder::enter
            63: rustc_mir_build::build::mir_built
            64: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::mir_built>::compute
            65: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
            66: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
            67: rustc_data_structures::stack::ensure_sufficient_stack
            68: rustc_query_system::query::plumbing::force_query_with_job
            69: rustc_query_system::query::plumbing::get_query_impl
            70: rustc_mir::transform::check_unsafety::unsafety_check_result
            71: core::ops::function::FnOnce::call_once
            72: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::unsafety_check_result>::compute
            73: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
            74: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
            75: rustc_data_structures::stack::ensure_sufficient_stack
            76: rustc_query_system::query::plumbing::force_query_with_job
            77: rustc_query_system::query::plumbing::get_query_impl
            78: rustc_query_system::query::plumbing::ensure_query_impl
            79: rustc_mir::transform::mir_const
            80: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::mir_const>::compute
            81: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
            82: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
            83: rustc_data_structures::stack::ensure_sufficient_stack
            84: rustc_query_system::query::plumbing::force_query_with_job
            85: rustc_query_system::query::plumbing::get_query_impl
            86: rustc_mir::transform::mir_promoted
            87: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::mir_promoted>::compute
            88: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
            89: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
            90: rustc_data_structures::stack::ensure_sufficient_stack
            91: rustc_query_system::query::plumbing::force_query_with_job
            92: rustc_query_system::query::plumbing::get_query_impl
            93: rustc_mir::borrow_check::mir_borrowck
            94: core::ops::function::FnOnce::call_once
            95: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::mir_borrowck>::compute
            96: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
            97: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
            98: rustc_data_structures::stack::ensure_sufficient_stack
            99: rustc_query_system::query::plumbing::force_query_with_job
           100: rustc_query_system::query::plumbing::get_query_impl
           101: rustc_typeck::collect::type_of::type_of
           102: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::type_of>::compute
           103: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
           104: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
           105: rustc_data_structures::stack::ensure_sufficient_stack
           106: rustc_query_system::query::plumbing::force_query_with_job
           107: rustc_query_system::query::plumbing::get_query_impl
           108: rustc_typeck::check::check::check_item_type
           109: rustc_middle::hir::map::Map::visit_item_likes_in_module
           110: rustc_typeck::check::check::check_mod_item_types
           111: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::check_mod_item_types>::compute
           112: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
           113: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
           114: rustc_data_structures::stack::ensure_sufficient_stack
           115: rustc_query_system::query::plumbing::force_query_with_job
           116: rustc_query_system::query::plumbing::get_query_impl
           117: rustc_query_system::query::plumbing::ensure_query_impl
           118: rustc_session::utils::<impl rustc_session::session::Session>::time
           119: rustc_typeck::check_crate
           120: rustc_interface::passes::analysis
           121: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::analysis>::compute
           122: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
           123: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
           124: rustc_data_structures::stack::ensure_sufficient_stack
           125: rustc_query_system::query::plumbing::force_query_with_job
           126: rustc_query_system::query::plumbing::get_query_impl
           127: rustc_interface::passes::QueryContext::enter
           128: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
           129: rustc_span::with_source_map
           130: rustc_interface::interface::create_compiler_and_run
           131: rustc_span::with_session_globals
           132: std::sys_common::backtrace::__rust_begin_short_backtrace
           133: core::ops::function::FnOnce::call_once{{vtable.shim}}
           134: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\library\alloc\src/boxed.rs:1521:9
                <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\library\alloc\src/boxed.rs:1521:9
                std::sys::windows::thread::Thread::new::thread_start
                       at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\std\src\sys\windows\thread.rs:56:17
           135: <unknown>
           136: <unknown>


thread 'rustc' panicked at 'no warnings or errors encountered even though `delayed_good_path_bugs` issued', compiler\rustc_errors\src\lib.rs:974:13
stack backtrace:
   0:         0x527ea6db - std::backtrace_rs::backtrace::dbghelp::trace::h099c0ebce18042e7
                               at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\std\src\..\..\backtrace\src\backtrace\dbghelp.rs:98:5
   1:         0x527ea6db - std::backtrace_rs::backtrace::trace_unsynchronized::h60466f2375b69387
                               at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66:5
   2:         0x527ea6db - std::sys_common::backtrace::_print_fmt::h8b4dc0c0d2fa23f6
                               at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\std\src\sys_common\backtrace.rs:67:5
   3:         0x527ea6db - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h35b8b38915e1bc02
                               at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\std\src\sys_common\backtrace.rs:46:22
   4:         0x528554ab - core::fmt::write::h84e7aafa8dd4e2b5
                               at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\core\src\fmt\mod.rs:1096:17
   5:         0x527dd661 - std::io::Write::write_fmt::h5cf20dc1f436c697
                               at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\std\src\io\mod.rs:1568:15
   6:         0x527ee1a8 - std::sys_common::backtrace::_print::h0168c471b620d9ec
                               at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\std\src\sys_common\backtrace.rs:49:5
   7:         0x527ee1a8 - std::sys_common::backtrace::print::h5dc90305ae0c8ef5
                               at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\std\src\sys_common\backtrace.rs:36:9
   8:         0x527ee1a8 - std::panicking::default_hook::{{closure}}::h776b613ba0b5bd15
                               at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\std\src\panicking.rs:208:50
   9:         0x527edd46 - std::panicking::default_hook::h0cedd2beda71d0c5
                               at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\std\src\panicking.rs:225:9
  10:         0x530b8da6 - rustc_driver::report_ice::h4c1b428b89d209a5
  11:         0x527eea0d - std::panicking::rust_panic_with_hook::hc47aa3eac4f4ebeb
                               at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\std\src\panicking.rs:595:17
  12:         0x527ee579 - std::panicking::begin_panic_handler::{{closure}}::hab1cbc585893772b
                               at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\std\src\panicking.rs:497:13
  13:         0x527eb0bf - std::sys_common::backtrace::__rust_end_short_backtrace::h3520c0a5bc5dd883
                               at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\std\src\sys_common\backtrace.rs:141:18
  14:         0x527ee4d9 - rust_begin_unwind
                               at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\std\src\panicking.rs:493:5
  15:         0x527ee48c - std::panicking::begin_panic_fmt::h8dba33e1cd895182
                               at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\std\src\panicking.rs:435:5
  16:         0x560a8932 - rustc_errors::HandlerInner::flush_delayed::h52e4edff29297038
  17:         0x560a4d22 - <rustc_errors::HandlerInner as core::ops::drop::Drop>::drop::h84880c0dcb2530d7
  18:         0x530c9279 - core::ptr::drop_in_place<rustc_session::parse::ParseSess>::h51620a7d665196c8
  19:         0x530d06ca - <alloc::rc::Rc<T> as core::ops::drop::Drop>::drop::haf7dc27497eb43d0
  20:         0x530ca5cf - core::ptr::drop_in_place<rustc_interface::interface::Compiler>::h6dfee60c1838f683
  21:         0x530bdd3f - rustc_span::with_source_map::h64b47373b08a1e5c
  22:         0x530dec3f - rustc_interface::interface::create_compiler_and_run::h29ef442a0b952274
  23:         0x530be53d - rustc_span::with_session_globals::hc735291d0ad65499
  24:         0x530e1235 - std::sys_common::backtrace::__rust_begin_short_backtrace::hec005665202107ca
  25:         0x53109f97 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h49a6bdc92bb48f1d
  26:         0x527fd329 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hada1b7cf3cf4998d
                               at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\library\alloc\src/boxed.rs:1521:9
  27:         0x527fd329 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc25ab237b938f88a
                               at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\library\alloc\src/boxed.rs:1521:9
  28:         0x527fd329 - std::sys::windows::thread::Thread::new::thread_start::hd12c2139229b9a8f
                               at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\std\src\sys\windows\thread.rs:56:17
  29:     0x7ff9a74c7034 - <unknown>
  30:     0x7ff9a7f62651 - <unknown>

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

Metadata

Metadata

Assignees

Labels

A-async-awaitArea: Async & AwaitA-const-genericsArea: const generics (parameters and arguments)AsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions