Skip to content

Labeled break in async fn ICE's #66702

Closed

Description

The following code ICE's on stable, beta and nightly:

async fn bug() {
    'a: loop {
        async { break 'a 0 }.await;
    }
}
Backtrace:
   Compiling playground v0.0.1 (/playground)
error[E0267]: `break` inside of an `async` block
 --> src/lib.rs:3:17
  |
3 |         async { break 'a 0 }.await;
  |               --^^^^^^^^^^--
  |               | |
  |               | cannot `break` inside of an `async` block
  |               enclosing `async` block

error: internal compiler error: src/librustc_typeck/check/mod.rs:537: could not find enclosing breakable with id HirId { owner: DefIndex(12), local_id: 46 }

thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:812:9
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.37/src/backtrace/libunwind.rs:88
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.37/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:76
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:60
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1030
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1412
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:64
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:196
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:210
  10: rustc_driver::report_ice
  11: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:477
  12: std::panicking::begin_panic
  13: rustc_errors::HandlerInner::bug
  14: rustc_errors::Handler::bug
  15: rustc::util::bug::opt_span_bug_fmt::{{closure}}
  16: rustc::ty::context::tls::with_opt::{{closure}}
  17: rustc::ty::context::tls::with_context_opt
  18: rustc::ty::context::tls::with_opt
  19: rustc::util::bug::opt_span_bug_fmt
  20: rustc::util::bug::bug_fmt
  21: rustc_typeck::check::EnclosingBreakables::find_breakable::{{closure}}
  22: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  23: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  24: rustc_typeck::check::FnCtxt::check_block_with_expected
  25: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  26: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  27: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_return_expr
  28: rustc_typeck::check::check_fn
  29: rustc_typeck::check::closure::<impl rustc_typeck::check::FnCtxt>::check_expr_closure
  30: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  31: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  32: rustc_typeck::check::FnCtxt::check_argument_types
  33: rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::confirm_builtin_call
  34: rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::check_call
  35: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  36: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  37: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_meets_expectation_or_error
  38: rustc_typeck::check::_match::<impl rustc_typeck::check::FnCtxt>::check_match
  39: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  40: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  41: rustc_typeck::check::FnCtxt::check_stmt
  42: rustc_typeck::check::FnCtxt::check_block_with_expected
  43: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  44: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  45: rustc_typeck::check::FnCtxt::check_block_with_expected
  46: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  47: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  48: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  49: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  50: rustc_typeck::check::FnCtxt::check_block_with_expected
  51: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  52: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  53: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_return_expr
  54: rustc_typeck::check::check_fn
  55: rustc_typeck::check::closure::<impl rustc_typeck::check::FnCtxt>::check_expr_closure
  56: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  57: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  58: rustc_typeck::check::FnCtxt::check_argument_types
  59: rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::confirm_builtin_call
  60: rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::check_call
  61: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  62: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  63: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_return_expr
  64: rustc_typeck::check::check_fn
  65: rustc::ty::context::GlobalCtxt::enter_local
  66: rustc_typeck::check::typeck_tables_of
  67: rustc::ty::query::__query_compute::typeck_tables_of
  68: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::typeck_tables_of>::compute
  69: rustc::dep_graph::graph::DepGraph::with_task_impl
  70: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  71: rustc::ty::query::__query_compute::typeck_tables_of
  72: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::typeck_tables_of>::compute
  73: rustc::dep_graph::graph::DepGraph::with_task_impl
  74: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  75: rustc_typeck::collect::checked_type_of
  76: rustc_typeck::collect::type_of
  77: rustc::ty::query::__query_compute::type_of
  78: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::type_of>::compute
  79: rustc::dep_graph::graph::DepGraph::with_task_impl
  80: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  81: rustc::hir::intravisit::walk_expr
  82: rustc::hir::intravisit::Visitor::visit_fn
  83: rustc::hir::intravisit::walk_item
  84: <rustc_typeck::collect::CollectItemTypesVisitor as rustc::hir::intravisit::Visitor>::visit_item
  85: rustc::hir::map::Map::visit_item_likes_in_module
  86: rustc_typeck::collect::collect_mod_item_types
  87: rustc::ty::query::__query_compute::collect_mod_item_types
  88: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::collect_mod_item_types>::compute
  89: rustc::dep_graph::graph::DepGraph::with_task_impl
  90: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  91: rustc_typeck::check_crate::{{closure}}::{{closure}}
  92: rustc::util::common::time
  93: rustc_typeck::check_crate
  94: rustc_interface::passes::analysis
  95: rustc::ty::query::__query_compute::analysis
  96: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  97: rustc_interface::passes::BoxedGlobalCtxt::access::{{closure}}
  98: rustc_interface::passes::create_global_ctxt::{{closure}}
  99: rustc_interface::interface::run_compiler_in_existing_thread_pool
 100: std::thread::local::LocalKey<T>::with
 101: scoped_tls::ScopedKey<T>::set
 102: syntax::with_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.39.0 (4560ea788 2019-11-04) running on x86_64-unknown-linux-gnu

note: compiler flags: -C opt-level=3 -C codegen-units=1 --crate-type lib

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

query stack during panic:
thread 'rustc' panicked at 'already borrowed: BorrowMutError', src/libcore/result.rs:1165:5
stack backtrace:
   0:     0x7fe9be0b7af4 - backtrace::backtrace::libunwind::trace::hda41dbcdfba36aa0
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.37/src/backtrace/libunwind.rs:88
   1:     0x7fe9be0b7af4 - backtrace::backtrace::trace_unsynchronized::h1a8d6e1f8cb3f5d4
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.37/src/backtrace/mod.rs:66
   2:     0x7fe9be0b7af4 - std::sys_common::backtrace::_print_fmt::h610c4127487e10da
                               at src/libstd/sys_common/backtrace.rs:76
   3:     0x7fe9be0b7af4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h0722dc552e01bd1d
                               at src/libstd/sys_common/backtrace.rs:60
   4:     0x7fe9be0f012c - core::fmt::write::h01edf6dd68a42c9c
                               at src/libcore/fmt/mod.rs:1030
   5:     0x7fe9be0abd17 - std::io::Write::write_fmt::hf15985f193f03c04
                               at src/libstd/io/mod.rs:1412
   6:     0x7fe9be0bc325 - std::sys_common::backtrace::_print::hd8d5d08a1795e743
                               at src/libstd/sys_common/backtrace.rs:64
   7:     0x7fe9be0bc325 - std::sys_common::backtrace::print::hf89a79e3921a2366
                               at src/libstd/sys_common/backtrace.rs:49
   8:     0x7fe9be0bc325 - std::panicking::default_hook::{{closure}}::h3a8f42beb3bb8ae3
                               at src/libstd/panicking.rs:196
   9:     0x7fe9be0bc016 - std::panicking::default_hook::h8f803b0bc31a5c37
                               at src/libstd/panicking.rs:210
  10:     0x7fe9be5f3483 - rustc_driver::report_ice::he98718c53edc6d3d
  11:     0x7fe9be0bcb0c - std::panicking::rust_panic_with_hook::h825f041245da8739
                               at src/libstd/panicking.rs:477
  12:     0x7fe9be0bc5c2 - std::panicking::continue_panic_fmt::hbe0378e33481e81b
                               at src/libstd/panicking.rs:380
  13:     0x7fe9be0bc4b6 - rust_begin_unwind
                               at src/libstd/panicking.rs:307
  14:     0x7fe9be0e9aca - core::panicking::panic_fmt::h527855ce0bc891f6
                               at src/libcore/panicking.rs:85
  15:     0x7fe9be0e9d07 - core::result::unwrap_failed::ha8b77e6004f0ba38
                               at src/libcore/result.rs:1165
  16:     0x7fe9c03cefe5 - rustc_errors::Handler::force_print_diagnostic::h807dd1aae3e0d79e
  17:     0x7fe9bfca1d91 - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::try_print_query_stack::h8734d6360e0a8b59
  18:     0x7fe9be5f4095 - rustc_driver::report_ice::he98718c53edc6d3d
  19:     0x7fe9be0bcb0c - std::panicking::rust_panic_with_hook::h825f041245da8739
                               at src/libstd/panicking.rs:477
  20:     0x7fe9c03b637d - std::panicking::begin_panic::h577649efa65d7301
  21:     0x7fe9c03cf743 - rustc_errors::HandlerInner::bug::hfd27cc932b37506a
  22:     0x7fe9c03ce62a - rustc_errors::Handler::bug::h32e2ca63254dbbec
  23:     0x7fe9bfc5e8c3 - rustc::util::bug::opt_span_bug_fmt::{{closure}}::hf2652d3cbc7068ac
  24:     0x7fe9bfc59933 - rustc::ty::context::tls::with_opt::{{closure}}::h0fe4f06c0a285fde
  25:     0x7fe9bfc598a3 - rustc::ty::context::tls::with_context_opt::h01f88b941c2d3d77
  26:     0x7fe9bfc598e7 - rustc::ty::context::tls::with_opt::hac6f601ca34cd941
  27:     0x7fe9bfc5e7d8 - rustc::util::bug::opt_span_bug_fmt::h234c815c9e7b30ef
  28:     0x7fe9bfc5e742 - rustc::util::bug::bug_fmt::hca65a18e8bb5d55b
  29:     0x7fe9beb6f8a2 - rustc_typeck::check::EnclosingBreakables::find_breakable::{{closure}}::h265e5fc67c32c4af
  30:     0x7fe9beb57c9d - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind::h8b25c6ef69e01f12
  31:     0x7fe9beb4f28b - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs::h0000f1a19a63396f
  32:     0x7fe9beb839d8 - rustc_typeck::check::FnCtxt::check_block_with_expected::h0bf314ef8ed232a6
  33:     0x7fe9beb4fcf3 - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind::h8b25c6ef69e01f12
  34:     0x7fe9beb4f28b - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs::h0000f1a19a63396f
  35:     0x7fe9beb58d9b - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_return_expr::h51bf174a038068dd
  36:     0x7fe9beb71e3d - rustc_typeck::check::check_fn::hb04722ffaefc34ec
  37:     0x7fe9beb67169 - rustc_typeck::check::closure::<impl rustc_typeck::check::FnCtxt>::check_expr_closure::h29325402c2b92831
  38:     0x7fe9beb4f903 - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind::h8b25c6ef69e01f12
  39:     0x7fe9beb4f28b - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs::h0000f1a19a63396f
  40:     0x7fe9beb80a30 - rustc_typeck::check::FnCtxt::check_argument_types::h648ecc2af68d79cc
  41:     0x7fe9beb6b042 - rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::confirm_builtin_call::ha7eae76e9c28b73b
  42:     0x7fe9beb69561 - rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::check_call::h45d30abc30b22158
  43:     0x7fe9beb4fcd8 - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind::h8b25c6ef69e01f12
  44:     0x7fe9beb4f28b - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs::h0000f1a19a63396f
  45:     0x7fe9beb4ef09 - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_meets_expectation_or_error::he950c77272da7372
  46:     0x7fe9beb3d08e - rustc_typeck::check::_match::<impl rustc_typeck::check::FnCtxt>::check_match::h4ebac9f0c5152075
  47:     0x7fe9beb50228 - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind::h8b25c6ef69e01f12
  48:     0x7fe9beb4f28b - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs::h0000f1a19a63396f
  49:     0x7fe9beb8346e - rustc_typeck::check::FnCtxt::check_stmt::h0ba900aec3e1ac68
  50:     0x7fe9beb8399b - rustc_typeck::check::FnCtxt::check_block_with_expected::h0bf314ef8ed232a6
  51:     0x7fe9beb51aa8 - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind::h8b25c6ef69e01f12
  52:     0x7fe9beb4f28b - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs::h0000f1a19a63396f
  53:     0x7fe9beb839d8 - rustc_typeck::check::FnCtxt::check_block_with_expected::h0bf314ef8ed232a6
  54:     0x7fe9beb4fcf3 - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind::h8b25c6ef69e01f12
  55:     0x7fe9beb4f28b - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs::h0000f1a19a63396f
  56:     0x7fe9beb4f920 - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind::h8b25c6ef69e01f12
  57:     0x7fe9beb4f28b - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs::h0000f1a19a63396f
  58:     0x7fe9beb839d8 - rustc_typeck::check::FnCtxt::check_block_with_expected::h0bf314ef8ed232a6
  59:     0x7fe9beb4fcf3 - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind::h8b25c6ef69e01f12
  60:     0x7fe9beb4f28b - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs::h0000f1a19a63396f
  61:     0x7fe9beb58d9b - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_return_expr::h51bf174a038068dd
  62:     0x7fe9beb71e3d - rustc_typeck::check::check_fn::hb04722ffaefc34ec
  63:     0x7fe9beb67169 - rustc_typeck::check::closure::<impl rustc_typeck::check::FnCtxt>::check_expr_closure::h29325402c2b92831
  64:     0x7fe9beb4f903 - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind::h8b25c6ef69e01f12
  65:     0x7fe9beb4f28b - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs::h0000f1a19a63396f
  66:     0x7fe9beb80a30 - rustc_typeck::check::FnCtxt::check_argument_types::h648ecc2af68d79cc
  67:     0x7fe9beb6b042 - rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::confirm_builtin_call::ha7eae76e9c28b73b
  68:     0x7fe9beb69561 - rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::check_call::h45d30abc30b22158
  69:     0x7fe9beb4fcd8 - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind::h8b25c6ef69e01f12
  70:     0x7fe9beb4f28b - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs::h0000f1a19a63396f
  71:     0x7fe9beb58d9b - rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_return_expr::h51bf174a038068dd
  72:     0x7fe9beb71e3d - rustc_typeck::check::check_fn::hb04722ffaefc34ec
  73:     0x7fe9becea518 - rustc::ty::context::GlobalCtxt::enter_local::hee87012a37ec7481
  74:     0x7fe9beb70ea2 - rustc_typeck::check::typeck_tables_of::h7e98a74ad7491971
  75:     0x7fe9bebc24ca - rustc::ty::query::__query_compute::typeck_tables_of::h8235d6e55b8e3584
  76:     0x7fe9bec5c15b - rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::typeck_tables_of>::compute::hef02a238f3e43402
  77:     0x7fe9bec00bea - rustc::dep_graph::graph::DepGraph::with_task_impl::hd911b0f10264fdeb
  78:     0x7fe9becdac8b - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query::hfde020d3574d1a10
  79:     0x7fe9bebc24ca - rustc::ty::query::__query_compute::typeck_tables_of::h8235d6e55b8e3584
  80:     0x7fe9bec5c15b - rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::typeck_tables_of>::compute::hef02a238f3e43402
  81:     0x7fe9bec00bea - rustc::dep_graph::graph::DepGraph::with_task_impl::hd911b0f10264fdeb
  82:     0x7fe9becdac8b - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query::hfde020d3574d1a10
  83:     0x7fe9bed210ae - rustc_typeck::collect::checked_type_of::hd3908c8eaed72ecd
  84:     0x7fe9bed207dc - rustc_typeck::collect::type_of::h799e995bf65f21ec
  85:     0x7fe9bebc40b7 - rustc::ty::query::__query_compute::type_of::hb01507aa4b57e392
  86:     0x7fe9bec5be5b - rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::type_of>::compute::hd6cd78f07fee48ed
  87:     0x7fe9bebfdf7a - rustc::dep_graph::graph::DepGraph::with_task_impl::hbdb7bb8db373711b
  88:     0x7fe9bec6b158 - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query::h0ad13fb369585832
  89:     0x7fe9bed3fbf0 - rustc::hir::intravisit::walk_expr::hf4b6465856d88960
  90:     0x7fe9becfff2c - rustc::hir::intravisit::Visitor::visit_fn::hd86c16bc3957ea4d
  91:     0x7fe9bed422f9 - rustc::hir::intravisit::walk_item::h2499ad75ffa206ec
  92:     0x7fe9bed1c75d - <rustc_typeck::collect::CollectItemTypesVisitor as rustc::hir::intravisit::Visitor>::visit_item::h6ecf11c5154ce45d
  93:     0x7fe9bebc7103 - rustc::hir::map::Map::visit_item_likes_in_module::h6cf58cf1c61058c9
  94:     0x7fe9bed1c424 - rustc_typeck::collect::collect_mod_item_types::ha8af4c2694cae051
  95:     0x7fe9bebc344a - rustc::ty::query::__query_compute::collect_mod_item_types::h0959d140ce4a445c
  96:     0x7fe9bec5c34b - rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::collect_mod_item_types>::compute::hcc8bedd87b11d3e0
  97:     0x7fe9bebefe9d - rustc::dep_graph::graph::DepGraph::with_task_impl::h1149bcd7b6e6f8f9
  98:     0x7fe9bec7e5aa - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query::h1ad8f3fe22fc6341
  99:     0x7fe9bebe723d - rustc_typeck::check_crate::{{closure}}::{{closure}}::hef852192e4b21571
 100:     0x7fe9bebc7766 - rustc::util::common::time::h6c804872fd5ef88f
 101:     0x7fe9bed973fc - rustc_typeck::check_crate::h2e77f97476aecad8
 102:     0x7fe9be6a200a - rustc_interface::passes::analysis::h7d37d49a7360493d
 103:     0x7fe9be5b5c01 - rustc::ty::query::__query_compute::analysis::h1c5cc76ea5bb496b
 104:     0x7fe9be59ed8e - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query::hcf7bc9d073dcb36b
 105:     0x7fe9be5bd42a - rustc_interface::passes::BoxedGlobalCtxt::access::{{closure}}::h7fc0f9f179325408
 106:     0x7fe9be71e1da - rustc_interface::passes::create_global_ctxt::{{closure}}::h10595b15ffb5db35
 107:     0x7fe9be5bf64e - rustc_interface::interface::run_compiler_in_existing_thread_pool::ha009ae4607895a11
 108:     0x7fe9be5f5362 - std::thread::local::LocalKey<T>::with::h30eaff0b6e71bc49
 109:     0x7fe9be5fa3ce - scoped_tls::ScopedKey<T>::set::h6ab0051cc42102a7
 110:     0x7fe9be61b1a2 - syntax::with_globals::h9994c1c3242d3263
 111:     0x7fe9be587e10 - std::sys_common::backtrace::__rust_begin_short_backtrace::h229c554686840b66
 112:     0x7fe9be0cd25a - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:80
 113:     0x7fe9be5b1879 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hf2e117c529f2753f
 114:     0x7fe9be09e1ff - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h483711add4ba2330
                               at /rustc/4560ea788cb760f0a34127156c78e2552949f734/src/liballoc/boxed.rs:922
 115:     0x7fe9be0cbf00 - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h7605b45eb29ed0be
                               at /rustc/4560ea788cb760f0a34127156c78e2552949f734/src/liballoc/boxed.rs:922
 116:     0x7fe9be0cbf00 - std::sys_common::thread::start_thread::h557b0c2dc4449562
                               at src/libstd/sys_common/thread.rs:13
 117:     0x7fe9be0cbf00 - std::sys::unix::thread::Thread::new::thread_start::h7c2a7f9b68fe4bba
                               at src/libstd/sys/unix/thread.rs:79
 118:     0x7fe9bde386db - start_thread
 119:     0x7fe9bd75588f - __clone
 120:                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/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.39.0 (4560ea788 2019-11-04) running on x86_64-unknown-linux-gnu

note: compiler flags: -C opt-level=3 -C codegen-units=1 --crate-type lib

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

query stack during panic:
thread panicked while processing panic. aborting.
error: could not compile `playground`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-closuresArea: Closures (`|…| { … }`)C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions