Closed
Description
I'm seeing an internal compiler error on the following input, found by fuzz-rustc:
Code
extern {
async fn L() {
async fn M() {}
}
}
Error output
error: incorrect function inside `extern` block
--> src/lib.rs:2:14
|
1 | extern {
| ------ `extern` blocks define existing foreign functions and functions inside of them cannot have a body
2 | async fn L() {
| ______________^___-
| | |
| | cannot have a body
3 | | async fn M() {}
4 | | }
| |_____- help: remove the invalid body: `;`
|
= help: you might have meant to write a function accessible through FFI, which can be done by writing `extern fn` outside of the `extern` block
= note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
error: functions in `extern` blocks cannot have qualifiers
--> src/lib.rs:2:14
|
1 | extern {
| ------ in this `extern` block
2 | async fn L() {
| ^
|
help: remove the qualifiers
|
2 | fn L() {
| ~~
error: internal compiler error: compiler/rustc_middle/src/hir/mod.rs:82:36: No HirId for DefId(0:6 ~ playground[522f]::{extern#0}::L::{closure#0})
Note that this code should not compile, the two errors before the ICE are correct.
Affected versions: nightly 2022-04-07 and beta 1.61.0-beta.1 both ICE with the same message, stable 1.60 does not ICE.
Backtrace
Compiling playground v0.0.1 (/playground)
error: incorrect function inside `extern` block
[--> src/lib.rs:2:14
](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021#) |
1 | extern {
| ------ `extern` blocks define existing foreign functions and functions inside of them cannot have a body
2 | async fn L() {
| ______________^___-
| | |
| | cannot have a body
3 | | async fn M() {}
4 | | }
| |_____- help: remove the invalid body: `;`
|
= help: you might have meant to write a function accessible through FFI, which can be done by writing `extern fn` outside of the `extern` block
= note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
error: functions in `extern` blocks cannot have qualifiers
[--> src/lib.rs:2:14
](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021#) |
1 | extern {
| ------ in this `extern` block
2 | async fn L() {
| ^
|
help: remove the qualifiers
|
2 | fn L() {
| ~~
error: internal compiler error: compiler/rustc_middle/src/hir/mod.rs:82:36: No HirId for DefId(0:6 ~ playground[522f]::{extern#0}::L::{closure#0})
thread 'rustc' panicked at 'Box<dyn Any>', /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/compiler/rustc_errors/src/lib.rs:1349:9
stack backtrace:
0: 0x7f370d413e0d - std::backtrace_rs::backtrace::libunwind::trace::h87fc9110a03070c9
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x7f370d413e0d - std::backtrace_rs::backtrace::trace_unsynchronized::hf8e09efda70fd4c4
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7f370d413e0d - std::sys_common::backtrace::_print_fmt::h2bba281e85b7e4cf
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/std/src/sys_common/backtrace.rs:66:5
3: 0x7f370d413e0d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h72fd149eebcc176d
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/std/src/sys_common/backtrace.rs:45:22
4: 0x7f370d46dc6c - core::fmt::write::h16877f69e16283c2
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/core/src/fmt/mod.rs:1194:17
5: 0x7f370d405611 - std::io::Write::write_fmt::h505f84b4395e02be
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/std/src/io/mod.rs:1655:15
6: 0x7f370d416d35 - std::sys_common::backtrace::_print::hff1b2addc8b3ab2e
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/std/src/sys_common/backtrace.rs:48:5
7: 0x7f370d416d35 - std::sys_common::backtrace::print::h5383334ff1a62414
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/std/src/sys_common/backtrace.rs:35:9
8: 0x7f370d416d35 - std::panicking::default_hook::{{closure}}::h55bff06032661335
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/std/src/panicking.rs:295:22
9: 0x7f370d4169a9 - std::panicking::default_hook::hbddb577ba3bd3e3a
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/std/src/panicking.rs:314:9
10: 0x7f370dbb6d31 - rustc_driver[20943ffe626f84b6]::DEFAULT_HOOK::{closure#0}::{closure#0}
11: 0x7f370d4174d0 - std::panicking::rust_panic_with_hook::h8fddd70bf6ad28e0
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/std/src/panicking.rs:702:17
12: 0x7f370ec1c2c1 - std[1f52b9863de3167b]::panicking::begin_panic::<rustc_errors[bbde95346f1428cb]::ExplicitBug>::{closure#0}
13: 0x7f370ec1b316 - std[1f52b9863de3167b]::sys_common::backtrace::__rust_end_short_backtrace::<std[1f52b9863de3167b]::panicking::begin_panic<rustc_errors[bbde95346f1428cb]::ExplicitBug>::{closure#0}, !>
14: 0x7f370eba2aff - std[1f52b9863de3167b]::panicking::begin_panic::<rustc_errors[bbde95346f1428cb]::ExplicitBug>
15: 0x7f370ebc8c26 - std[1f52b9863de3167b]::panic::panic_any::<rustc_errors[bbde95346f1428cb]::ExplicitBug>
16: 0x7f370ebc8b55 - <rustc_errors[bbde95346f1428cb]::HandlerInner>::bug::<&alloc[330c6987bd660c40]::string::String>
17: 0x7f370ebc88c0 - <rustc_errors[bbde95346f1428cb]::Handler>::bug::<&alloc[330c6987bd660c40]::string::String>
18: 0x7f370ec229ad - rustc_middle[7f64d339e0b7d513]::ty::context::tls::with_opt::<rustc_middle[7f64d339e0b7d513]::util::bug::opt_span_bug_fmt<rustc_span[c549c48e758487d2]::span_encoding::Span>::{closure#0}, ()>
19: 0x7f370ec22b86 - rustc_middle[7f64d339e0b7d513]::util::bug::opt_span_bug_fmt::<rustc_span[c549c48e758487d2]::span_encoding::Span>
20: 0x7f370ec22af3 - rustc_middle[7f64d339e0b7d513]::util::bug::bug_fmt
21: 0x7f370fa2d8b1 - <rustc_middle[7f64d339e0b7d513]::hir::provide::{closure#3} as core[eae4a2c4558b790c]::ops::function::FnOnce<(rustc_middle[7f64d339e0b7d513]::ty::context::TyCtxt, rustc_span[c549c48e758487d2]::def_id::LocalDefId)>>::call_once
22: 0x7f370f5bce4b - rustc_query_system[bc809a0ba9a8482d]::query::plumbing::get_query::<rustc_query_impl[95fa4d0da0451691]::queries::local_def_id_to_hir_id, rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt>
23: 0x7f370fa82b54 - <rustc_middle[7f64d339e0b7d513]::hir::map::Map>::get_module_parent_node
24: 0x7f370fa2cdb4 - <rustc_middle[7f64d339e0b7d513]::hir::provide::{closure#0} as core[eae4a2c4558b790c]::ops::function::FnOnce<(rustc_middle[7f64d339e0b7d513]::ty::context::TyCtxt, rustc_span[c549c48e758487d2]::def_id::LocalDefId)>>::call_once
25: 0x7f370f576400 - rustc_query_system[bc809a0ba9a8482d]::query::plumbing::try_execute_query::<rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt, rustc_query_system[bc809a0ba9a8482d]::query::caches::DefaultCache<rustc_span[c549c48e758487d2]::def_id::LocalDefId, rustc_span[c549c48e758487d2]::def_id::LocalDefId>>
26: 0x7f370f65f896 - <rustc_query_impl[95fa4d0da0451691]::Queries as rustc_middle[7f64d339e0b7d513]::ty::query::QueryEngine>::parent_module_from_def_id
27: 0x7f370fa2565f - <rustc_middle[7f64d339e0b7d513]::ty::context::TyCtxt>::adjust_ident_and_get_scope
28: 0x7f370f0dbb01 - <dyn rustc_typeck[459ac015d2c67e7e]::astconv::AstConv>::instantiate_poly_trait_ref_inner
29: 0x7f370df4797a - <dyn rustc_typeck[459ac015d2c67e7e]::astconv::AstConv>::instantiate_lang_item_trait_ref
30: 0x7f370fe1daf7 - <dyn rustc_typeck[459ac015d2c67e7e]::astconv::AstConv>::add_bounds::<core[eae4a2c4558b790c]::slice::iter::Iter<rustc_hir[3eace101c153d1f4]::hir::GenericBound>>
31: 0x7f370fdd4466 - rustc_typeck[459ac015d2c67e7e]::collect::item_bounds::explicit_item_bounds
32: 0x7f3710016197 - rustc_query_system[bc809a0ba9a8482d]::query::plumbing::try_execute_query::<rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt, rustc_query_system[bc809a0ba9a8482d]::query::caches::DefaultCache<rustc_span[c549c48e758487d2]::def_id::DefId, &[(rustc_middle[7f64d339e0b7d513]::ty::Predicate, rustc_span[c549c48e758487d2]::span_encoding::Span)]>>
33: 0x7f371006285f - rustc_query_system[bc809a0ba9a8482d]::query::plumbing::get_query::<rustc_query_impl[95fa4d0da0451691]::queries::explicit_item_bounds, rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt>
34: 0x7f370fdd4c4a - rustc_typeck[459ac015d2c67e7e]::collect::item_bounds::item_bounds
35: 0x7f371001203e - rustc_query_system[bc809a0ba9a8482d]::query::plumbing::try_execute_query::<rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt, rustc_query_system[bc809a0ba9a8482d]::query::caches::DefaultCache<rustc_span[c549c48e758487d2]::def_id::DefId, &rustc_middle[7f64d339e0b7d513]::ty::list::List<rustc_middle[7f64d339e0b7d513]::ty::Predicate>>>
36: 0x7f3710058d09 - rustc_query_system[bc809a0ba9a8482d]::query::plumbing::get_query::<rustc_query_impl[95fa4d0da0451691]::queries::item_bounds, rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt>
37: 0x7f37102f832c - <rustc_trait_selection[41f150cee6be8073]::traits::select::SelectionContext>::match_projection_obligation_against_definition_bounds
38: 0x7f370f88c2ee - <rustc_trait_selection[41f150cee6be8073]::traits::select::SelectionContext>::assemble_candidates
39: 0x7f370f880d1e - <rustc_trait_selection[41f150cee6be8073]::traits::select::SelectionContext>::candidate_from_obligation_no_cache
40: 0x7f370f897350 - <rustc_trait_selection[41f150cee6be8073]::traits::select::SelectionContext>::select
41: 0x7f370f8d048e - <rustc_trait_selection[41f150cee6be8073]::traits::fulfill::FulfillProcessor>::process_changed_obligations
42: 0x7f370f8e3533 - <rustc_data_structures[fae15044d3ca7ff8]::obligation_forest::ObligationForest<rustc_trait_selection[41f150cee6be8073]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[41f150cee6be8073]::traits::fulfill::FulfillProcessor, rustc_data_structures[fae15044d3ca7ff8]::obligation_forest::Outcome<rustc_trait_selection[41f150cee6be8073]::traits::fulfill::PendingPredicateObligation, rustc_infer[2bb09421bfed907a]::traits::FulfillmentErrorCode>>
43: 0x7f370f8cfd71 - <rustc_trait_selection[41f150cee6be8073]::traits::fulfill::FulfillmentContext as rustc_infer[2bb09421bfed907a]::traits::engine::TraitEngine>::select_where_possible
44: 0x7f370f000d39 - <rustc_typeck[459ac015d2c67e7e]::check::fn_ctxt::FnCtxt>::check_call
45: 0x7f370f044078 - <rustc_typeck[459ac015d2c67e7e]::check::fn_ctxt::FnCtxt>::check_expr_kind
46: 0x7f370f041ed6 - <rustc_typeck[459ac015d2c67e7e]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
47: 0x7f370f146bb8 - rustc_typeck[459ac015d2c67e7e]::check::check::check_fn
48: 0x7f370f0b60bf - <rustc_infer[2bb09421bfed907a]::infer::InferCtxtBuilder>::enter::<&rustc_middle[7f64d339e0b7d513]::ty::context::TypeckResults, <rustc_typeck[459ac015d2c67e7e]::check::inherited::InheritedBuilder>::enter<rustc_typeck[459ac015d2c67e7e]::check::typeck_with_fallback<rustc_typeck[459ac015d2c67e7e]::check::typeck::{closure#0}>::{closure#1}, &rustc_middle[7f64d339e0b7d513]::ty::context::TypeckResults>::{closure#0}>
49: 0x7f370f08158d - rustc_typeck[459ac015d2c67e7e]::check::typeck
50: 0x7f370f582697 - rustc_query_system[bc809a0ba9a8482d]::query::plumbing::try_execute_query::<rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt, rustc_query_system[bc809a0ba9a8482d]::query::caches::DefaultCache<rustc_span[c549c48e758487d2]::def_id::LocalDefId, &rustc_middle[7f64d339e0b7d513]::ty::context::TypeckResults>>
51: 0x7f370f661438 - <rustc_query_impl[95fa4d0da0451691]::Queries as rustc_middle[7f64d339e0b7d513]::ty::query::QueryEngine>::typeck
52: 0x7f370f08178f - rustc_typeck[459ac015d2c67e7e]::check::typeck
53: 0x7f370f582697 - rustc_query_system[bc809a0ba9a8482d]::query::plumbing::try_execute_query::<rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt, rustc_query_system[bc809a0ba9a8482d]::query::caches::DefaultCache<rustc_span[c549c48e758487d2]::def_id::LocalDefId, &rustc_middle[7f64d339e0b7d513]::ty::context::TypeckResults>>
54: 0x7f370f661438 - <rustc_query_impl[95fa4d0da0451691]::Queries as rustc_middle[7f64d339e0b7d513]::ty::query::QueryEngine>::typeck
55: 0x7f370f0ed4a8 - <rustc_middle[7f64d339e0b7d513]::hir::map::Map>::par_body_owners::<rustc_typeck[459ac015d2c67e7e]::check::typeck_item_bodies::{closure#0}>
56: 0x7f370fddc23c - rustc_typeck[459ac015d2c67e7e]::check::typeck_item_bodies
57: 0x7f3710037c87 - rustc_query_system[bc809a0ba9a8482d]::query::plumbing::try_execute_query::<rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt, rustc_query_system[bc809a0ba9a8482d]::query::caches::DefaultCache<(), ()>>
58: 0x7f3710061821 - rustc_query_system[bc809a0ba9a8482d]::query::plumbing::get_query::<rustc_query_impl[95fa4d0da0451691]::queries::typeck_item_bodies, rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt>
59: 0x7f370fdeaefd - rustc_typeck[459ac015d2c67e7e]::check_crate
60: 0x7f370fb66ed7 - rustc_interface[6f5777461d223668]::passes::analysis
61: 0x7f371002daae - rustc_query_system[bc809a0ba9a8482d]::query::plumbing::try_execute_query::<rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt, rustc_query_system[bc809a0ba9a8482d]::query::caches::DefaultCache<(), core[eae4a2c4558b790c]::result::Result<(), rustc_errors[bbde95346f1428cb]::ErrorGuaranteed>>>
62: 0x7f371007125e - rustc_query_system[bc809a0ba9a8482d]::query::plumbing::get_query::<rustc_query_impl[95fa4d0da0451691]::queries::analysis, rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt>
63: 0x7f370fb3f9d7 - <rustc_interface[6f5777461d223668]::passes::QueryContext>::enter::<rustc_driver[20943ffe626f84b6]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[eae4a2c4558b790c]::result::Result<(), rustc_errors[bbde95346f1428cb]::ErrorGuaranteed>>
64: 0x7f370fb2a09b - <rustc_interface[6f5777461d223668]::interface::Compiler>::enter::<rustc_driver[20943ffe626f84b6]::run_compiler::{closure#1}::{closure#2}, core[eae4a2c4558b790c]::result::Result<core[eae4a2c4558b790c]::option::Option<rustc_interface[6f5777461d223668]::queries::Linker>, rustc_errors[bbde95346f1428cb]::ErrorGuaranteed>>
65: 0x7f370fb5354f - rustc_span[c549c48e758487d2]::with_source_map::<core[eae4a2c4558b790c]::result::Result<(), rustc_errors[bbde95346f1428cb]::ErrorGuaranteed>, rustc_interface[6f5777461d223668]::interface::create_compiler_and_run<core[eae4a2c4558b790c]::result::Result<(), rustc_errors[bbde95346f1428cb]::ErrorGuaranteed>, rustc_driver[20943ffe626f84b6]::run_compiler::{closure#1}>::{closure#1}>
66: 0x7f370fb2af27 - <scoped_tls[4c52abfab712cd8e]::ScopedKey<rustc_span[c549c48e758487d2]::SessionGlobals>>::set::<rustc_interface[6f5777461d223668]::interface::run_compiler<core[eae4a2c4558b790c]::result::Result<(), rustc_errors[bbde95346f1428cb]::ErrorGuaranteed>, rustc_driver[20943ffe626f84b6]::run_compiler::{closure#1}>::{closure#0}, core[eae4a2c4558b790c]::result::Result<(), rustc_errors[bbde95346f1428cb]::ErrorGuaranteed>>
67: 0x7f370fb4005f - std[1f52b9863de3167b]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[6f5777461d223668]::util::run_in_thread_pool_with_globals<rustc_interface[6f5777461d223668]::interface::run_compiler<core[eae4a2c4558b790c]::result::Result<(), rustc_errors[bbde95346f1428cb]::ErrorGuaranteed>, rustc_driver[20943ffe626f84b6]::run_compiler::{closure#1}>::{closure#0}, core[eae4a2c4558b790c]::result::Result<(), rustc_errors[bbde95346f1428cb]::ErrorGuaranteed>>::{closure#0}, core[eae4a2c4558b790c]::result::Result<(), rustc_errors[bbde95346f1428cb]::ErrorGuaranteed>>
68: 0x7f370fb40199 - <<std[1f52b9863de3167b]::thread::Builder>::spawn_unchecked_<rustc_interface[6f5777461d223668]::util::run_in_thread_pool_with_globals<rustc_interface[6f5777461d223668]::interface::run_compiler<core[eae4a2c4558b790c]::result::Result<(), rustc_errors[bbde95346f1428cb]::ErrorGuaranteed>, rustc_driver[20943ffe626f84b6]::run_compiler::{closure#1}>::{closure#0}, core[eae4a2c4558b790c]::result::Result<(), rustc_errors[bbde95346f1428cb]::ErrorGuaranteed>>::{closure#0}, core[eae4a2c4558b790c]::result::Result<(), rustc_errors[bbde95346f1428cb]::ErrorGuaranteed>>::{closure#1} as core[eae4a2c4558b790c]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
69: 0x7f370d4215c3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h66b0cb04558949f8
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/alloc/src/boxed.rs:1853:9
70: 0x7f370d4215c3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h2674426c74373260
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/alloc/src/boxed.rs:1853:9
71: 0x7f370d4215c3 - std::sys::unix::thread::Thread::new::thread_start::he975fba2104844cd
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/std/src/sys/unix/thread.rs:108:17
72: 0x7f370d351609 - start_thread
73: 0x7f370d26a163 - clone
74: 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.62.0-nightly (e745b4ddb 2022-04-07) running on x86_64-unknown-linux-gnu
note: compiler flags: --crate-type lib -C embed-bitcode=no -C codegen-units=1 -C debuginfo=2
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
thread 'rustc' panicked at 'already borrowed: BorrowMutError', /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/compiler/rustc_data_structures/src/sync.rs:423:16
stack backtrace:
0: 0x7f370d413e0d - std::backtrace_rs::backtrace::libunwind::trace::h87fc9110a03070c9
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x7f370d413e0d - std::backtrace_rs::backtrace::trace_unsynchronized::hf8e09efda70fd4c4
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7f370d413e0d - std::sys_common::backtrace::_print_fmt::h2bba281e85b7e4cf
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/std/src/sys_common/backtrace.rs:66:5
3: 0x7f370d413e0d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h72fd149eebcc176d
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/std/src/sys_common/backtrace.rs:45:22
4: 0x7f370d46dc6c - core::fmt::write::h16877f69e16283c2
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/core/src/fmt/mod.rs:1194:17
5: 0x7f370d405611 - std::io::Write::write_fmt::h505f84b4395e02be
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/std/src/io/mod.rs:1655:15
6: 0x7f370d416d35 - std::sys_common::backtrace::_print::hff1b2addc8b3ab2e
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/std/src/sys_common/backtrace.rs:48:5
7: 0x7f370d416d35 - std::sys_common::backtrace::print::h5383334ff1a62414
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/std/src/sys_common/backtrace.rs:35:9
8: 0x7f370d416d35 - std::panicking::default_hook::{{closure}}::h55bff06032661335
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/std/src/panicking.rs:295:22
9: 0x7f370d4169a9 - std::panicking::default_hook::hbddb577ba3bd3e3a
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/std/src/panicking.rs:314:9
10: 0x7f370dbb6d31 - rustc_driver[20943ffe626f84b6]::DEFAULT_HOOK::{closure#0}::{closure#0}
11: 0x7f370d4174d0 - std::panicking::rust_panic_with_hook::h8fddd70bf6ad28e0
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/std/src/panicking.rs:702:17
12: 0x7f370d417307 - std::panicking::begin_panic_handler::{{closure}}::h9ed2b9c069b0b649
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/std/src/panicking.rs:588:13
13: 0x7f370d4142c4 - std::sys_common::backtrace::__rust_end_short_backtrace::hc2651b8923246021
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/std/src/sys_common/backtrace.rs:138:18
14: 0x7f370d417039 - rust_begin_unwind
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/std/src/panicking.rs:584:5
15: 0x7f370d3db6f3 - core::panicking::panic_fmt::h0606840aebfd8c79
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/core/src/panicking.rs:142:14
16: 0x7f370d3db7e3 - core::result::unwrap_failed::hb5cf9663bfa93d05
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/core/src/result.rs:1785:5
17: 0x7f370f5bda72 - rustc_query_system[bc809a0ba9a8482d]::query::plumbing::get_query::<rustc_query_impl[95fa4d0da0451691]::queries::local_def_id_to_hir_id, rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt>
18: 0x7f370fa2e9d6 - <rustc_middle[7f64d339e0b7d513]::hir::provide::{closure#8} as core[eae4a2c4558b790c]::ops::function::FnOnce<(rustc_middle[7f64d339e0b7d513]::ty::context::TyCtxt, rustc_span[c549c48e758487d2]::def_id::DefId)>>::call_once
19: 0x7f370f5c60ac - rustc_query_system[bc809a0ba9a8482d]::query::plumbing::get_query::<rustc_query_impl[95fa4d0da0451691]::queries::def_span, rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt>
20: 0x7f370f661d4e - <rustc_query_impl[95fa4d0da0451691]::Queries as rustc_middle[7f64d339e0b7d513]::ty::query::QueryEngine>::def_span
21: 0x7f370e554916 - <rustc_span[c549c48e758487d2]::def_id::DefId as rustc_query_impl[95fa4d0da0451691]::keys::Key>::default_span
22: 0x7f370e5547f5 - <rustc_span[c549c48e758487d2]::def_id::LocalDefId as rustc_query_impl[95fa4d0da0451691]::keys::Key>::default_span
23: 0x7f370e5f193d - rustc_query_impl[95fa4d0da0451691]::make_query::local_def_id_to_hir_id
24: 0x7f370e4296f5 - <rustc_query_system[bc809a0ba9a8482d]::query::plumbing::QueryState<rustc_span[c549c48e758487d2]::def_id::LocalDefId>>::try_collect_active_jobs::<rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt>
25: 0x7f370e632420 - <rustc_query_impl[95fa4d0da0451691]::Queries>::try_collect_active_jobs
26: 0x7f370e5a338c - <rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt>::try_print_query_stack
27: 0x7f370dc90232 - rustc_interface[6f5777461d223668]::interface::try_print_query_stack
28: 0x7f370dbb79e4 - rustc_driver[20943ffe626f84b6]::report_ice
29: 0x7f370d4174d0 - std::panicking::rust_panic_with_hook::h8fddd70bf6ad28e0
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/std/src/panicking.rs:702:17
30: 0x7f370ec1c2c1 - std[1f52b9863de3167b]::panicking::begin_panic::<rustc_errors[bbde95346f1428cb]::ExplicitBug>::{closure#0}
31: 0x7f370ec1b316 - std[1f52b9863de3167b]::sys_common::backtrace::__rust_end_short_backtrace::<std[1f52b9863de3167b]::panicking::begin_panic<rustc_errors[bbde95346f1428cb]::ExplicitBug>::{closure#0}, !>
32: 0x7f370eba2aff - std[1f52b9863de3167b]::panicking::begin_panic::<rustc_errors[bbde95346f1428cb]::ExplicitBug>
33: 0x7f370ebc8c26 - std[1f52b9863de3167b]::panic::panic_any::<rustc_errors[bbde95346f1428cb]::ExplicitBug>
34: 0x7f370ebc8b55 - <rustc_errors[bbde95346f1428cb]::HandlerInner>::bug::<&alloc[330c6987bd660c40]::string::String>
35: 0x7f370ebc88c0 - <rustc_errors[bbde95346f1428cb]::Handler>::bug::<&alloc[330c6987bd660c40]::string::String>
36: 0x7f370ec229ad - rustc_middle[7f64d339e0b7d513]::ty::context::tls::with_opt::<rustc_middle[7f64d339e0b7d513]::util::bug::opt_span_bug_fmt<rustc_span[c549c48e758487d2]::span_encoding::Span>::{closure#0}, ()>
37: 0x7f370ec22b86 - rustc_middle[7f64d339e0b7d513]::util::bug::opt_span_bug_fmt::<rustc_span[c549c48e758487d2]::span_encoding::Span>
38: 0x7f370ec22af3 - rustc_middle[7f64d339e0b7d513]::util::bug::bug_fmt
39: 0x7f370fa2d8b1 - <rustc_middle[7f64d339e0b7d513]::hir::provide::{closure#3} as core[eae4a2c4558b790c]::ops::function::FnOnce<(rustc_middle[7f64d339e0b7d513]::ty::context::TyCtxt, rustc_span[c549c48e758487d2]::def_id::LocalDefId)>>::call_once
40: 0x7f370f5bce4b - rustc_query_system[bc809a0ba9a8482d]::query::plumbing::get_query::<rustc_query_impl[95fa4d0da0451691]::queries::local_def_id_to_hir_id, rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt>
41: 0x7f370fa82b54 - <rustc_middle[7f64d339e0b7d513]::hir::map::Map>::get_module_parent_node
42: 0x7f370fa2cdb4 - <rustc_middle[7f64d339e0b7d513]::hir::provide::{closure#0} as core[eae4a2c4558b790c]::ops::function::FnOnce<(rustc_middle[7f64d339e0b7d513]::ty::context::TyCtxt, rustc_span[c549c48e758487d2]::def_id::LocalDefId)>>::call_once
43: 0x7f370f576400 - rustc_query_system[bc809a0ba9a8482d]::query::plumbing::try_execute_query::<rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt, rustc_query_system[bc809a0ba9a8482d]::query::caches::DefaultCache<rustc_span[c549c48e758487d2]::def_id::LocalDefId, rustc_span[c549c48e758487d2]::def_id::LocalDefId>>
44: 0x7f370f65f896 - <rustc_query_impl[95fa4d0da0451691]::Queries as rustc_middle[7f64d339e0b7d513]::ty::query::QueryEngine>::parent_module_from_def_id
45: 0x7f370fa2565f - <rustc_middle[7f64d339e0b7d513]::ty::context::TyCtxt>::adjust_ident_and_get_scope
46: 0x7f370f0dbb01 - <dyn rustc_typeck[459ac015d2c67e7e]::astconv::AstConv>::instantiate_poly_trait_ref_inner
47: 0x7f370df4797a - <dyn rustc_typeck[459ac015d2c67e7e]::astconv::AstConv>::instantiate_lang_item_trait_ref
48: 0x7f370fe1daf7 - <dyn rustc_typeck[459ac015d2c67e7e]::astconv::AstConv>::add_bounds::<core[eae4a2c4558b790c]::slice::iter::Iter<rustc_hir[3eace101c153d1f4]::hir::GenericBound>>
49: 0x7f370fdd4466 - rustc_typeck[459ac015d2c67e7e]::collect::item_bounds::explicit_item_bounds
50: 0x7f3710016197 - rustc_query_system[bc809a0ba9a8482d]::query::plumbing::try_execute_query::<rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt, rustc_query_system[bc809a0ba9a8482d]::query::caches::DefaultCache<rustc_span[c549c48e758487d2]::def_id::DefId, &[(rustc_middle[7f64d339e0b7d513]::ty::Predicate, rustc_span[c549c48e758487d2]::span_encoding::Span)]>>
51: 0x7f371006285f - rustc_query_system[bc809a0ba9a8482d]::query::plumbing::get_query::<rustc_query_impl[95fa4d0da0451691]::queries::explicit_item_bounds, rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt>
52: 0x7f370fdd4c4a - rustc_typeck[459ac015d2c67e7e]::collect::item_bounds::item_bounds
53: 0x7f371001203e - rustc_query_system[bc809a0ba9a8482d]::query::plumbing::try_execute_query::<rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt, rustc_query_system[bc809a0ba9a8482d]::query::caches::DefaultCache<rustc_span[c549c48e758487d2]::def_id::DefId, &rustc_middle[7f64d339e0b7d513]::ty::list::List<rustc_middle[7f64d339e0b7d513]::ty::Predicate>>>
54: 0x7f3710058d09 - rustc_query_system[bc809a0ba9a8482d]::query::plumbing::get_query::<rustc_query_impl[95fa4d0da0451691]::queries::item_bounds, rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt>
55: 0x7f37102f832c - <rustc_trait_selection[41f150cee6be8073]::traits::select::SelectionContext>::match_projection_obligation_against_definition_bounds
56: 0x7f370f88c2ee - <rustc_trait_selection[41f150cee6be8073]::traits::select::SelectionContext>::assemble_candidates
57: 0x7f370f880d1e - <rustc_trait_selection[41f150cee6be8073]::traits::select::SelectionContext>::candidate_from_obligation_no_cache
58: 0x7f370f897350 - <rustc_trait_selection[41f150cee6be8073]::traits::select::SelectionContext>::select
59: 0x7f370f8d048e - <rustc_trait_selection[41f150cee6be8073]::traits::fulfill::FulfillProcessor>::process_changed_obligations
60: 0x7f370f8e3533 - <rustc_data_structures[fae15044d3ca7ff8]::obligation_forest::ObligationForest<rustc_trait_selection[41f150cee6be8073]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[41f150cee6be8073]::traits::fulfill::FulfillProcessor, rustc_data_structures[fae15044d3ca7ff8]::obligation_forest::Outcome<rustc_trait_selection[41f150cee6be8073]::traits::fulfill::PendingPredicateObligation, rustc_infer[2bb09421bfed907a]::traits::FulfillmentErrorCode>>
61: 0x7f370f8cfd71 - <rustc_trait_selection[41f150cee6be8073]::traits::fulfill::FulfillmentContext as rustc_infer[2bb09421bfed907a]::traits::engine::TraitEngine>::select_where_possible
62: 0x7f370f000d39 - <rustc_typeck[459ac015d2c67e7e]::check::fn_ctxt::FnCtxt>::check_call
63: 0x7f370f044078 - <rustc_typeck[459ac015d2c67e7e]::check::fn_ctxt::FnCtxt>::check_expr_kind
64: 0x7f370f041ed6 - <rustc_typeck[459ac015d2c67e7e]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
65: 0x7f370f146bb8 - rustc_typeck[459ac015d2c67e7e]::check::check::check_fn
66: 0x7f370f0b60bf - <rustc_infer[2bb09421bfed907a]::infer::InferCtxtBuilder>::enter::<&rustc_middle[7f64d339e0b7d513]::ty::context::TypeckResults, <rustc_typeck[459ac015d2c67e7e]::check::inherited::InheritedBuilder>::enter<rustc_typeck[459ac015d2c67e7e]::check::typeck_with_fallback<rustc_typeck[459ac015d2c67e7e]::check::typeck::{closure#0}>::{closure#1}, &rustc_middle[7f64d339e0b7d513]::ty::context::TypeckResults>::{closure#0}>
67: 0x7f370f08158d - rustc_typeck[459ac015d2c67e7e]::check::typeck
68: 0x7f370f582697 - rustc_query_system[bc809a0ba9a8482d]::query::plumbing::try_execute_query::<rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt, rustc_query_system[bc809a0ba9a8482d]::query::caches::DefaultCache<rustc_span[c549c48e758487d2]::def_id::LocalDefId, &rustc_middle[7f64d339e0b7d513]::ty::context::TypeckResults>>
69: 0x7f370f661438 - <rustc_query_impl[95fa4d0da0451691]::Queries as rustc_middle[7f64d339e0b7d513]::ty::query::QueryEngine>::typeck
70: 0x7f370f08178f - rustc_typeck[459ac015d2c67e7e]::check::typeck
71: 0x7f370f582697 - rustc_query_system[bc809a0ba9a8482d]::query::plumbing::try_execute_query::<rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt, rustc_query_system[bc809a0ba9a8482d]::query::caches::DefaultCache<rustc_span[c549c48e758487d2]::def_id::LocalDefId, &rustc_middle[7f64d339e0b7d513]::ty::context::TypeckResults>>
72: 0x7f370f661438 - <rustc_query_impl[95fa4d0da0451691]::Queries as rustc_middle[7f64d339e0b7d513]::ty::query::QueryEngine>::typeck
73: 0x7f370f0ed4a8 - <rustc_middle[7f64d339e0b7d513]::hir::map::Map>::par_body_owners::<rustc_typeck[459ac015d2c67e7e]::check::typeck_item_bodies::{closure#0}>
74: 0x7f370fddc23c - rustc_typeck[459ac015d2c67e7e]::check::typeck_item_bodies
75: 0x7f3710037c87 - rustc_query_system[bc809a0ba9a8482d]::query::plumbing::try_execute_query::<rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt, rustc_query_system[bc809a0ba9a8482d]::query::caches::DefaultCache<(), ()>>
76: 0x7f3710061821 - rustc_query_system[bc809a0ba9a8482d]::query::plumbing::get_query::<rustc_query_impl[95fa4d0da0451691]::queries::typeck_item_bodies, rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt>
77: 0x7f370fdeaefd - rustc_typeck[459ac015d2c67e7e]::check_crate
78: 0x7f370fb66ed7 - rustc_interface[6f5777461d223668]::passes::analysis
79: 0x7f371002daae - rustc_query_system[bc809a0ba9a8482d]::query::plumbing::try_execute_query::<rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt, rustc_query_system[bc809a0ba9a8482d]::query::caches::DefaultCache<(), core[eae4a2c4558b790c]::result::Result<(), rustc_errors[bbde95346f1428cb]::ErrorGuaranteed>>>
80: 0x7f371007125e - rustc_query_system[bc809a0ba9a8482d]::query::plumbing::get_query::<rustc_query_impl[95fa4d0da0451691]::queries::analysis, rustc_query_impl[95fa4d0da0451691]::plumbing::QueryCtxt>
81: 0x7f370fb3f9d7 - <rustc_interface[6f5777461d223668]::passes::QueryContext>::enter::<rustc_driver[20943ffe626f84b6]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[eae4a2c4558b790c]::result::Result<(), rustc_errors[bbde95346f1428cb]::ErrorGuaranteed>>
82: 0x7f370fb2a09b - <rustc_interface[6f5777461d223668]::interface::Compiler>::enter::<rustc_driver[20943ffe626f84b6]::run_compiler::{closure#1}::{closure#2}, core[eae4a2c4558b790c]::result::Result<core[eae4a2c4558b790c]::option::Option<rustc_interface[6f5777461d223668]::queries::Linker>, rustc_errors[bbde95346f1428cb]::ErrorGuaranteed>>
83: 0x7f370fb5354f - rustc_span[c549c48e758487d2]::with_source_map::<core[eae4a2c4558b790c]::result::Result<(), rustc_errors[bbde95346f1428cb]::ErrorGuaranteed>, rustc_interface[6f5777461d223668]::interface::create_compiler_and_run<core[eae4a2c4558b790c]::result::Result<(), rustc_errors[bbde95346f1428cb]::ErrorGuaranteed>, rustc_driver[20943ffe626f84b6]::run_compiler::{closure#1}>::{closure#1}>
84: 0x7f370fb2af27 - <scoped_tls[4c52abfab712cd8e]::ScopedKey<rustc_span[c549c48e758487d2]::SessionGlobals>>::set::<rustc_interface[6f5777461d223668]::interface::run_compiler<core[eae4a2c4558b790c]::result::Result<(), rustc_errors[bbde95346f1428cb]::ErrorGuaranteed>, rustc_driver[20943ffe626f84b6]::run_compiler::{closure#1}>::{closure#0}, core[eae4a2c4558b790c]::result::Result<(), rustc_errors[bbde95346f1428cb]::ErrorGuaranteed>>
85: 0x7f370fb4005f - std[1f52b9863de3167b]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[6f5777461d223668]::util::run_in_thread_pool_with_globals<rustc_interface[6f5777461d223668]::interface::run_compiler<core[eae4a2c4558b790c]::result::Result<(), rustc_errors[bbde95346f1428cb]::ErrorGuaranteed>, rustc_driver[20943ffe626f84b6]::run_compiler::{closure#1}>::{closure#0}, core[eae4a2c4558b790c]::result::Result<(), rustc_errors[bbde95346f1428cb]::ErrorGuaranteed>>::{closure#0}, core[eae4a2c4558b790c]::result::Result<(), rustc_errors[bbde95346f1428cb]::ErrorGuaranteed>>
86: 0x7f370fb40199 - <<std[1f52b9863de3167b]::thread::Builder>::spawn_unchecked_<rustc_interface[6f5777461d223668]::util::run_in_thread_pool_with_globals<rustc_interface[6f5777461d223668]::interface::run_compiler<core[eae4a2c4558b790c]::result::Result<(), rustc_errors[bbde95346f1428cb]::ErrorGuaranteed>, rustc_driver[20943ffe626f84b6]::run_compiler::{closure#1}>::{closure#0}, core[eae4a2c4558b790c]::result::Result<(), rustc_errors[bbde95346f1428cb]::ErrorGuaranteed>>::{closure#0}, core[eae4a2c4558b790c]::result::Result<(), rustc_errors[bbde95346f1428cb]::ErrorGuaranteed>>::{closure#1} as core[eae4a2c4558b790c]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
87: 0x7f370d4215c3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h66b0cb04558949f8
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/alloc/src/boxed.rs:1853:9
88: 0x7f370d4215c3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h2674426c74373260
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/alloc/src/boxed.rs:1853:9
89: 0x7f370d4215c3 - std::sys::unix::thread::Thread::new::thread_start::he975fba2104844cd
at /rustc/e745b4ddbd05026c75aae4506aef39fdfe1603c5/library/std/src/sys/unix/thread.rs:108:17
90: 0x7f370d351609 - start_thread
91: 0x7f370d26a163 - clone
92: 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.62.0-nightly (e745b4ddb 2022-04-07) running on x86_64-unknown-linux-gnu
note: compiler flags: --crate-type lib -C embed-bitcode=no -C codegen-units=1 -C debuginfo=2
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
end of query stack
thread panicked while panicking. aborting.
error: could not compile `playground` due to 2 previous errors
The error message is the same as #95307, but this issue looks more similar to #91370.
Metadata
Metadata
Assignees
Labels
Category: This is a bug.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Relevant to the compiler team, which will review and decide on the PR/issue.ICE tracked in rust-lang/glacier.