Closed
Description
See code at https://github.com/windowsboy111/rustc-bug-reproduce #99665 (comment).
Meta
rustc --version --verbose
:
rustc 1.61.0 (fe5b13d68 2022-05-18)
binary: rustc
commit-hash: fe5b13d681f25ee6474be29d748c65adcd91f69e
commit-date: 2022-05-18
host: x86_64-unknown-linux-gnu
release: 1.61.0
LLVM version: 14.0.0
=====
rustc 1.63.0-beta.7 (12c5b1ef3 2022-07-22)
binary: rustc
commit-hash: 12c5b1ef3882fa824a7dc6054f9f15732b44c863
commit-date: 2022-07-22
host: x86_64-unknown-linux-gnu
release: 1.63.0-beta.7
LLVM version: 14.0.5
=====
rustc 1.64.0-nightly (93ffde6f0 2022-07-23)
binary: rustc
commit-hash: 93ffde6f04d3d24327a4e17a2a2bf4f63c246235
commit-date: 2022-07-23
host: x86_64-unknown-linux-gnu
release: 1.64.0-nightly
LLVM version: 14.0.6
Error output
thread 'rustc' panicked at 'no entry found for key', compiler/rustc_borrowck/src/region_infer/mod.rs:2264:9
(backtrace here)
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.63.0-beta.7 (12c5b1ef3 2022-07-22) running on x86_64-unknown-linux-gnu
note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C linker=/usr/bin/clang -C incremental -C link-arg=--ld-path=/usr/bin/mold
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
#0 [mir_borrowck] borrow-checking `artifacts::{closure#1}`
#1 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `anda-web`
Backtrace
stack backtrace:
0: 0x7f3b73a9e14d - std::backtrace_rs::backtrace::libunwind::trace::h4ffcb1087d4a670b
at /rustc/12c5b1ef3882fa824a7dc6054f9f15732b44c863/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x7f3b73a9e14d - std::backtrace_rs::backtrace::trace_unsynchronized::hfebfd398676dabc8
at /rustc/12c5b1ef3882fa824a7dc6054f9f15732b44c863/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7f3b73a9e14d - std::sys_common::backtrace::_print_fmt::h5e8697080c4d91af
at /rustc/12c5b1ef3882fa824a7dc6054f9f15732b44c863/library/std/src/sys_common/backtrace.rs:66:5
3: 0x7f3b73a9e14d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h8b4eb6155253b0c4
at /rustc/12c5b1ef3882fa824a7dc6054f9f15732b44c863/library/std/src/sys_common/backtrace.rs:45:22
4: 0x7f3b73af9f3c - core::fmt::write::h0df1d5b0a79c4094
at /rustc/12c5b1ef3882fa824a7dc6054f9f15732b44c863/library/core/src/fmt/mod.rs:1197:17
5: 0x7f3b73a8f7c1 - std::io::Write::write_fmt::h799cdcc747bb79c7
at /rustc/12c5b1ef3882fa824a7dc6054f9f15732b44c863/library/std/src/io/mod.rs:1672:15
6: 0x7f3b73aa0e15 - std::sys_common::backtrace::_print::ha56459f70c2dacd6
at /rustc/12c5b1ef3882fa824a7dc6054f9f15732b44c863/library/std/src/sys_common/backtrace.rs:48:5
7: 0x7f3b73aa0e15 - std::sys_common::backtrace::print::hb0fd3c04c08f61a3
at /rustc/12c5b1ef3882fa824a7dc6054f9f15732b44c863/library/std/src/sys_common/backtrace.rs:35:9
8: 0x7f3b73aa0e15 - std::panicking::default_hook::{{closure}}::h2b9b6a57f92337dc
at /rustc/12c5b1ef3882fa824a7dc6054f9f15732b44c863/library/std/src/panicking.rs:295:22
9: 0x7f3b73aa0b36 - std::panicking::default_hook::hbd653821328540e3
at /rustc/12c5b1ef3882fa824a7dc6054f9f15732b44c863/library/std/src/panicking.rs:314:9
10: 0x7f3b7430f8d4 - rustc_driver[f54b8859d8db0cb5]::DEFAULT_HOOK::{closure#0}::{closure#0}
11: 0x7f3b617560b3 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h40d3a69e862028a3
at /rustc/12c5b1ef3882fa824a7dc6054f9f15732b44c863/library/alloc/src/boxed.rs:1965:9
12: 0x7f3b616c6f5d - proc_macro::bridge::client::<impl proc_macro::bridge::Bridge>::enter::{{closure}}::{{closure}}::h7d6bb5dc1ba8ba03
at /rustc/12c5b1ef3882fa824a7dc6054f9f15732b44c863/library/proc_macro/src/bridge/client.rs:328:21
13: 0x7f3b73aa14ea - std::panicking::rust_panic_with_hook::h06887b27b2f69040
at /rustc/12c5b1ef3882fa824a7dc6054f9f15732b44c863/library/std/src/panicking.rs:702:17
14: 0x7f3b73aa1327 - std::panicking::begin_panic_handler::{{closure}}::h88f3790f1b171aa4
at /rustc/12c5b1ef3882fa824a7dc6054f9f15732b44c863/library/std/src/panicking.rs:588:13
15: 0x7f3b73a9e604 - std::sys_common::backtrace::__rust_end_short_backtrace::h1933595d50be09d2
at /rustc/12c5b1ef3882fa824a7dc6054f9f15732b44c863/library/std/src/sys_common/backtrace.rs:138:18
16: 0x7f3b73aa1059 - rust_begin_unwind
at /rustc/12c5b1ef3882fa824a7dc6054f9f15732b44c863/library/std/src/panicking.rs:584:5
17: 0x7f3b73a66213 - core::panicking::panic_fmt::hf5dfeb6d3201b4c6
at /rustc/12c5b1ef3882fa824a7dc6054f9f15732b44c863/library/core/src/panicking.rs:142:14
18: 0x7f3b73af6ba1 - core::panicking::panic_display::h26b3e6fc71383d76
at /rustc/12c5b1ef3882fa824a7dc6054f9f15732b44c863/library/core/src/panicking.rs:72:5
19: 0x7f3b73af6b4b - core::panicking::panic_str::h0a6026aa28b068ee
at /rustc/12c5b1ef3882fa824a7dc6054f9f15732b44c863/library/core/src/panicking.rs:56:5
20: 0x7f3b73a66086 - core::option::expect_failed::h0903a4404197be00
at /rustc/12c5b1ef3882fa824a7dc6054f9f15732b44c863/library/core/src/option.rs:1874:5
21: 0x7f3b74986965 - <rustc_borrowck[c65f7980544eeed]::region_infer::RegionInferenceContext>::universe_info
22: 0x7f3b75cb6ea0 - rustc_borrowck[c65f7980544eeed]::do_mir_borrowck
23: 0x7f3b75cac479 - rustc_borrowck[c65f7980544eeed]::mir_borrowck
24: 0x7f3b75ca91f0 - <rustc_borrowck[c65f7980544eeed]::provide::{closure#0} as core[1646eeb42a20e539]::ops::function::FnOnce<(rustc_middle[6bafe7476f4ae10b]::ty::context::TyCtxt, rustc_span[8cf41c961bdff9]::def_id::LocalDefId)>>::call_once
25: 0x7f3b769cf881 - <rustc_query_system[54319d294505bd71]::dep_graph::graph::DepGraph<rustc_middle[6bafe7476f4ae10b]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[6bafe7476f4ae10b]::ty::context::TyCtxt, rustc_span[8cf41c961bdff9]::def_id::LocalDefId, &rustc_middle[6bafe7476f4ae10b]::mir::query::BorrowCheckResult>
26: 0x7f3b75f0b730 - rustc_query_system[54319d294505bd71]::query::plumbing::try_execute_query::<rustc_query_impl[dd3d36effa06450b]::plumbing::QueryCtxt, rustc_query_system[54319d294505bd71]::query::caches::DefaultCache<rustc_span[8cf41c961bdff9]::def_id::LocalDefId, &rustc_middle[6bafe7476f4ae10b]::mir::query::BorrowCheckResult>>
27: 0x7f3b75ee088a - <rustc_query_impl[dd3d36effa06450b]::Queries as rustc_middle[6bafe7476f4ae10b]::ty::query::QueryEngine>::mir_borrowck
28: 0x7f3b756718ed - <rustc_middle[6bafe7476f4ae10b]::hir::map::Map>::par_body_owners::<rustc_interface[6187cd9eca8862a9]::passes::analysis::{closure#2}::{closure#0}>
29: 0x7f3b7653c218 - <rustc_session[c2529ebf4e9d0d9d]::session::Session>::time::<(), rustc_interface[6187cd9eca8862a9]::passes::analysis::{closure#2}>
30: 0x7f3b76536025 - rustc_interface[6187cd9eca8862a9]::passes::analysis
31: 0x7f3b769e9c45 - <rustc_query_system[54319d294505bd71]::dep_graph::graph::DepGraph<rustc_middle[6bafe7476f4ae10b]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[6bafe7476f4ae10b]::ty::context::TyCtxt, (), core[1646eeb42a20e539]::result::Result<(), rustc_errors[b6ac0efed4ab3867]::ErrorGuaranteed>>
32: 0x7f3b76a92c1d - rustc_query_system[54319d294505bd71]::query::plumbing::try_execute_query::<rustc_query_impl[dd3d36effa06450b]::plumbing::QueryCtxt, rustc_query_system[54319d294505bd71]::query::caches::DefaultCache<(), core[1646eeb42a20e539]::result::Result<(), rustc_errors[b6ac0efed4ab3867]::ErrorGuaranteed>>>
33: 0x7f3b76adcbee - rustc_query_system[54319d294505bd71]::query::plumbing::get_query::<rustc_query_impl[dd3d36effa06450b]::queries::analysis, rustc_query_impl[dd3d36effa06450b]::plumbing::QueryCtxt>
34: 0x7f3b76519797 - <rustc_interface[6187cd9eca8862a9]::passes::QueryContext>::enter::<rustc_driver[f54b8859d8db0cb5]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[1646eeb42a20e539]::result::Result<(), rustc_errors[b6ac0efed4ab3867]::ErrorGuaranteed>>
35: 0x7f3b765038ff - <rustc_interface[6187cd9eca8862a9]::interface::Compiler>::enter::<rustc_driver[f54b8859d8db0cb5]::run_compiler::{closure#1}::{closure#2}, core[1646eeb42a20e539]::result::Result<core[1646eeb42a20e539]::option::Option<rustc_interface[6187cd9eca8862a9]::queries::Linker>, rustc_errors[b6ac0efed4ab3867]::ErrorGuaranteed>>
36: 0x7f3b764fcebf - rustc_span[8cf41c961bdff9]::with_source_map::<core[1646eeb42a20e539]::result::Result<(), rustc_errors[b6ac0efed4ab3867]::ErrorGuaranteed>, rustc_interface[6187cd9eca8862a9]::interface::create_compiler_and_run<core[1646eeb42a20e539]::result::Result<(), rustc_errors[b6ac0efed4ab3867]::ErrorGuaranteed>, rustc_driver[f54b8859d8db0cb5]::run_compiler::{closure#1}>::{closure#1}>
37: 0x7f3b76504792 - <scoped_tls[818e4097567bb31]::ScopedKey<rustc_span[8cf41c961bdff9]::SessionGlobals>>::set::<rustc_interface[6187cd9eca8862a9]::interface::run_compiler<core[1646eeb42a20e539]::result::Result<(), rustc_errors[b6ac0efed4ab3867]::ErrorGuaranteed>, rustc_driver[f54b8859d8db0cb5]::run_compiler::{closure#1}>::{closure#0}, core[1646eeb42a20e539]::result::Result<(), rustc_errors[b6ac0efed4ab3867]::ErrorGuaranteed>>
38: 0x7f3b76519e1f - std[13c53672748f15b9]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[6187cd9eca8862a9]::util::run_in_thread_pool_with_globals<rustc_interface[6187cd9eca8862a9]::interface::run_compiler<core[1646eeb42a20e539]::result::Result<(), rustc_errors[b6ac0efed4ab3867]::ErrorGuaranteed>, rustc_driver[f54b8859d8db0cb5]::run_compiler::{closure#1}>::{closure#0}, core[1646eeb42a20e539]::result::Result<(), rustc_errors[b6ac0efed4ab3867]::ErrorGuaranteed>>::{closure#0}, core[1646eeb42a20e539]::result::Result<(), rustc_errors[b6ac0efed4ab3867]::ErrorGuaranteed>>
39: 0x7f3b7651a009 - <<std[13c53672748f15b9]::thread::Builder>::spawn_unchecked_<rustc_interface[6187cd9eca8862a9]::util::run_in_thread_pool_with_globals<rustc_interface[6187cd9eca8862a9]::interface::run_compiler<core[1646eeb42a20e539]::result::Result<(), rustc_errors[b6ac0efed4ab3867]::ErrorGuaranteed>, rustc_driver[f54b8859d8db0cb5]::run_compiler::{closure#1}>::{closure#0}, core[1646eeb42a20e539]::result::Result<(), rustc_errors[b6ac0efed4ab3867]::ErrorGuaranteed>>::{closure#0}, core[1646eeb42a20e539]::result::Result<(), rustc_errors[b6ac0efed4ab3867]::ErrorGuaranteed>>::{closure#1} as core[1646eeb42a20e539]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
40: 0x7f3b73aab423 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h8714758ff84f304b
at /rustc/12c5b1ef3882fa824a7dc6054f9f15732b44c863/library/alloc/src/boxed.rs:1951:9
41: 0x7f3b73aab423 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hb14c8f0668b31f6f
at /rustc/12c5b1ef3882fa824a7dc6054f9f15732b44c863/library/alloc/src/boxed.rs:1951:9
42: 0x7f3b73aab423 - std::sys::unix::thread::Thread::new::thread_start::hb16e22a1d03248b9
at /rustc/12c5b1ef3882fa824a7dc6054f9f15732b44c863/library/std/src/sys/unix/thread.rs:108:17
43: 0x7f3b7388ae2d - start_thread
44: 0x7f3b73910620 - __GI___clone3
45: 0x0 - <unknown>
(edit starts here)
To people who are reading:
This Github issue contains 2 ICE issues
The original code I minimised causes an ICE on stable, beta and nightly
But the further-minimised code only causes ICEs on beta and nightly, and therefore is a separate issue