Closed matthiaskrgr closed 1 year ago
https://github.com/rust-lang/rust/pull/113210 cc @fee1-dead
Now fixed by errors, see rust-lang/glacier#1648. However, the new error looks unrelated to effects
and it might just be the case that it masks a still existing effects
bug, not sure.
Fixed on the latest nightly, marking as E-needs-test (or, feel free to close if we have a sufficient regression test) @rustbot labels: +E-needs-test
Code
Meta
rustc --version --verbose
:Error output
Backtrace
``` thread 'rustc' panicked at 'index out of bounds: the len is 2 but the index is 2', compiler/rustc_hir_typeck/src/callee.rs:785:39 stack backtrace: 0: 0x7f2e58563a81 - std::backtrace_rs::backtrace::libunwind::trace::hd0180fafc3f67189 at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5 1: 0x7f2e58563a81 - std::backtrace_rs::backtrace::trace_unsynchronized::h5f5f542cfcd3ea93 at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x7f2e58563a81 - std::sys_common::backtrace::_print_fmt::h58fe9485d729332b at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/std/src/sys_common/backtrace.rs:65:5 3: 0x7f2e58563a81 -::fmt::h892fa574703406ce
at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/std/src/sys_common/backtrace.rs:44:22
4: 0x7f2e585c9d8f - core::fmt::rt::Argument::fmt::h9323d9ac1296ca86
at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/core/src/fmt/rt.rs:138:9
5: 0x7f2e585c9d8f - core::fmt::write::h7b3311fc7bec7011
at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/core/src/fmt/mod.rs:1094:21
6: 0x7f2e585564c7 - std::io::Write::write_fmt::hf0bd33b3cf0f8fc8
at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/std/src/io/mod.rs:1714:15
7: 0x7f2e58563895 - std::sys_common::backtrace::_print::h05e7ce29169ad453
at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/std/src/sys_common/backtrace.rs:47:5
8: 0x7f2e58563895 - std::sys_common::backtrace::print::h259bd490e3a5f495
at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/std/src/sys_common/backtrace.rs:34:9
9: 0x7f2e58566673 - std::panicking::default_hook::{{closure}}::h60419100c25d1f9e
at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/std/src/panicking.rs:269:22
10: 0x7f2e58566404 - std::panicking::default_hook::h5458ac0b23f9b258
at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/std/src/panicking.rs:288:9
11: 0x7f2e5b83634b - rustc_driver_impl[e2bfb106dcd1f64f]::install_ice_hook::{closure#0}
12: 0x7f2e58566e9e - as core::ops::function::Fn>::call::h4fc06bcacf328e1a
at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/alloc/src/boxed.rs:2024:9
13: 0x7f2e58566e9e - std::panicking::rust_panic_with_hook::hc4b8011c5070ed88
at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/std/src/panicking.rs:709:13
14: 0x7f2e58566c27 - std::panicking::begin_panic_handler::{{closure}}::h49c3f3c1bfbdf6f5
at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/std/src/panicking.rs:597:13
15: 0x7f2e58563ee6 - std::sys_common::backtrace::__rust_end_short_backtrace::hd9eda361758b8cc0
at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/std/src/sys_common/backtrace.rs:151:18
16: 0x7f2e58566972 - rust_begin_unwind
at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/std/src/panicking.rs:593:5
17: 0x7f2e585c5fe3 - core::panicking::panic_fmt::h35522819180bdf02
at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/core/src/panicking.rs:67:14
18: 0x7f2e585c6142 - core::panicking::panic_bounds_check::hc42424beea31bf08
at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/core/src/panicking.rs:162:5
19: 0x7f2e59f00383 - ::check_call
20: 0x7f2e59d4895a - ::check_expr_kind
21: 0x7f2e59a67f00 - ::check_expr_coercible_to_type
22: 0x7f2e5a197547 - rustc_hir_typeck[f6dc91c3434d623d]::typeck
23: 0x7f2e5985d86c - rustc_query_impl[b274d6131f7b1f90]::plumbing::__rust_begin_short_backtrace::>
24: 0x7f2e5985d84e - >::call_once
25: 0x7f2e59984e2d - rustc_query_system[d3399df1ed0f61e2]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[b274d6131f7b1f90]::plumbing::QueryCtxt, false>
26: 0x7f2e5b1ad6e1 - rustc_query_impl[b274d6131f7b1f90]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
27: 0x7f2e5a21b21a - rustc_mir_build[434844369d9e27b0]::thir::cx::thir_body
28: 0x7f2e59859361 - rustc_query_impl[b274d6131f7b1f90]::plumbing::__rust_begin_short_backtrace::>
29: 0x7f2e59cec957 - rustc_query_system[d3399df1ed0f61e2]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[b274d6131f7b1f90]::plumbing::QueryCtxt, false>
30: 0x7f2e5b19e247 - rustc_query_impl[b274d6131f7b1f90]::query_impl::thir_body::get_query_non_incr::__rust_end_short_backtrace
31: 0x7f2e5b02f274 - rustc_mir_build[434844369d9e27b0]::thir::pattern::check_match::check_match
32: 0x7f2e5983688c - rustc_query_impl[b274d6131f7b1f90]::plumbing::__rust_begin_short_backtrace::>
33: 0x7f2e59f8e0d1 - rustc_query_system[d3399df1ed0f61e2]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[b274d6131f7b1f90]::plumbing::QueryCtxt, false>
34: 0x7f2e5b1b7dd4 - rustc_query_impl[b274d6131f7b1f90]::query_impl::check_match::get_query_non_incr::__rust_end_short_backtrace
35: 0x7f2e5a7153ff - rustc_mir_build[434844369d9e27b0]::build::mir_built
36: 0x7f2e5985d8ac - rustc_query_impl[b274d6131f7b1f90]::plumbing::__rust_begin_short_backtrace::>
37: 0x7f2e5985d88e - >::call_once
38: 0x7f2e59984e2d - rustc_query_system[d3399df1ed0f61e2]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[b274d6131f7b1f90]::plumbing::QueryCtxt, false>
39: 0x7f2e5b1b6fd1 - rustc_query_impl[b274d6131f7b1f90]::query_impl::mir_built::get_query_non_incr::__rust_end_short_backtrace
40: 0x7f2e5a99c846 - rustc_mir_transform[ec227e6ecf7841bc]::check_unsafety::unsafety_check_result
41: 0x7f2e5985d8ec - rustc_query_impl[b274d6131f7b1f90]::plumbing::__rust_begin_short_backtrace::>
42: 0x7f2e5985d8ce - >::call_once
43: 0x7f2e59984e2d - rustc_query_system[d3399df1ed0f61e2]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[b274d6131f7b1f90]::plumbing::QueryCtxt, false>
44: 0x7f2e5b17ef01 - rustc_query_impl[b274d6131f7b1f90]::query_impl::unsafety_check_result::get_query_non_incr::__rust_end_short_backtrace
45: 0x7f2e5ac026d4 - rustc_mir_transform[ec227e6ecf7841bc]::mir_const
46: 0x7f2e5986ee5e - rustc_query_impl[b274d6131f7b1f90]::plumbing::__rust_begin_short_backtrace::>
47: 0x7f2e5986ee2e - >::call_once
48: 0x7f2e59984e2d - rustc_query_system[d3399df1ed0f61e2]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[b274d6131f7b1f90]::plumbing::QueryCtxt, false>
49: 0x7f2e5b1acee1 - rustc_query_impl[b274d6131f7b1f90]::query_impl::mir_const::get_query_non_incr::__rust_end_short_backtrace
50: 0x7f2e59a8a61d - rustc_query_impl[b274d6131f7b1f90]::plumbing::__rust_begin_short_backtrace::>
51: 0x7f2e5a68037f - rustc_query_system[d3399df1ed0f61e2]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[b274d6131f7b1f90]::plumbing::QueryCtxt, false>
52: 0x7f2e5a68009a - rustc_query_impl[b274d6131f7b1f90]::query_impl::mir_const_qualif::get_query_non_incr::__rust_end_short_backtrace
53: 0x7f2e59acfa59 - rustc_mir_transform[ec227e6ecf7841bc]::mir_promoted
54: 0x7f2e5985c991 - rustc_query_impl[b274d6131f7b1f90]::plumbing::__rust_begin_short_backtrace::>
55: 0x7f2e59cec72d - rustc_query_system[d3399df1ed0f61e2]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[b274d6131f7b1f90]::plumbing::QueryCtxt, false>
56: 0x7f2e5b1b70d7 - rustc_query_impl[b274d6131f7b1f90]::query_impl::mir_promoted::get_query_non_incr::__rust_end_short_backtrace
57: 0x7f2e5a8308ac - rustc_borrowck[5a01dde83f3c2e21]::mir_borrowck
58: 0x7f2e5986edfe - rustc_query_impl[b274d6131f7b1f90]::plumbing::__rust_begin_short_backtrace::>
59: 0x7f2e5986edce - >::call_once
60: 0x7f2e59984e2d - rustc_query_system[d3399df1ed0f61e2]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[b274d6131f7b1f90]::plumbing::QueryCtxt, false>
61: 0x7f2e5b1b7bf1 - rustc_query_impl[b274d6131f7b1f90]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
62: 0x7f2e59e4ad5f - rustc_mir_transform[ec227e6ecf7841bc]::mir_drops_elaborated_and_const_checked
63: 0x7f2e59884fbe - rustc_query_impl[b274d6131f7b1f90]::plumbing::__rust_begin_short_backtrace::>
64: 0x7f2e59884f8e - >::call_once
65: 0x7f2e59984e2d - rustc_query_system[d3399df1ed0f61e2]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[b274d6131f7b1f90]::plumbing::QueryCtxt, false>
66: 0x7f2e5b19e441 - rustc_query_impl[b274d6131f7b1f90]::query_impl::mir_drops_elaborated_and_const_checked::get_query_non_incr::__rust_end_short_backtrace
67: 0x7f2e5a623ffb - rustc_mir_transform[ec227e6ecf7841bc]::mir_for_ctfe
68: 0x7f2e598e372e - rustc_query_impl[b274d6131f7b1f90]::plumbing::__rust_begin_short_backtrace::>
69: 0x7f2e598e3701 - >::call_once
70: 0x7f2e5986ad65 - rustc_query_system[d3399df1ed0f61e2]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[b274d6131f7b1f90]::plumbing::QueryCtxt, false>
71: 0x7f2e5b1bbf94 - rustc_query_impl[b274d6131f7b1f90]::query_impl::mir_for_ctfe::get_query_non_incr::__rust_end_short_backtrace
72: 0x7f2e59c5fcf3 - >::load_mir
73: 0x7f2e59ba98ce - rustc_const_eval[b302f7cb5da55945]::const_eval::eval_queries::eval_to_allocation_raw_provider
74: 0x7f2e598b7497 - rustc_query_impl[b274d6131f7b1f90]::plumbing::__rust_begin_short_backtrace::>
75: 0x7f2e5a44d0cc - rustc_query_system[d3399df1ed0f61e2]::query::plumbing::try_execute_query::, rustc_middle[36f410a133de2eee]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[b274d6131f7b1f90]::plumbing::QueryCtxt, false>
76: 0x7f2e5a44cd8d - rustc_query_impl[b274d6131f7b1f90]::query_impl::eval_to_allocation_raw::get_query_non_incr::__rust_end_short_backtrace
77: 0x7f2e59ba9dce - rustc_const_eval[b302f7cb5da55945]::const_eval::eval_queries::eval_to_allocation_raw_provider
78: 0x7f2e598b7497 - rustc_query_impl[b274d6131f7b1f90]::plumbing::__rust_begin_short_backtrace::>
79: 0x7f2e5a44d0cc - rustc_query_system[d3399df1ed0f61e2]::query::plumbing::try_execute_query::, rustc_middle[36f410a133de2eee]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[b274d6131f7b1f90]::plumbing::QueryCtxt, false>
80: 0x7f2e5a44cd8d - rustc_query_impl[b274d6131f7b1f90]::query_impl::eval_to_allocation_raw::get_query_non_incr::__rust_end_short_backtrace
81: 0x7f2e5af275c2 - rustc_const_eval[b302f7cb5da55945]::const_eval::eval_to_valtree
82: 0x7f2e5af27450 - )>>::call_once
83: 0x7f2e5ac2a769 - rustc_query_impl[b274d6131f7b1f90]::plumbing::__rust_begin_short_backtrace::>
84: 0x7f2e5ac2a718 - )>>::call_once
85: 0x7f2e5add8dd8 - rustc_query_system[d3399df1ed0f61e2]::query::plumbing::try_execute_query::, rustc_middle[36f410a133de2eee]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[b274d6131f7b1f90]::plumbing::QueryCtxt, false>
86: 0x7f2e5add8abd - rustc_query_impl[b274d6131f7b1f90]::query_impl::eval_to_valtree::get_query_non_incr::__rust_end_short_backtrace
87: 0x7f2e5a01aecc - rustc_middle[36f410a133de2eee]::query::plumbing::query_get_at::, rustc_middle[36f410a133de2eee]::query::erase::Erased<[u8; 24usize]>>>
88: 0x7f2e5a01abc3 - ::const_eval_global_id_for_typeck
89: 0x7f2e5a01a67a - ::const_eval_resolve_for_typeck
90: 0x7f2e599c719f - >::fold_const
91: 0x7f2e599c68dc - >::try_fold_ty
92: 0x7f2e59e2f855 - as alloc[ff37fbd0c789fff0]::vec::spec_extend::SpecExtend>, rustc_trait_selection[e02e86acf418abe3]::traits::normalize_param_env_or_error::{closure#0}>, >::extend_deduped>, rustc_trait_selection[e02e86acf418abe3]::traits::normalize_param_env_or_error::{closure#0}>>::{closure#0}>>>::spec_extend
93: 0x7f2e59f92049 - rustc_trait_selection[e02e86acf418abe3]::traits::normalize_param_env_or_error
94: 0x7f2e59f8f618 - rustc_ty_utils[b5b000661e3923a8]::ty::param_env
95: 0x7f2e5982ce14 - rustc_query_impl[b274d6131f7b1f90]::plumbing::__rust_begin_short_backtrace::>
96: 0x7f2e5982cde0 - >::call_once
97: 0x7f2e5986ad65 - rustc_query_system[d3399df1ed0f61e2]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[b274d6131f7b1f90]::plumbing::QueryCtxt, false>
98: 0x7f2e5b1805f3 - rustc_query_impl[b274d6131f7b1f90]::query_impl::param_env::get_query_non_incr::__rust_end_short_backtrace
99: 0x7f2e5a4bf796 - rustc_middle[36f410a133de2eee]::query::plumbing::query_get_at::>>
100: 0x7f2e5a4dfe4b - rustc_hir_analysis[efec7ea34622ed25]::check::wfcheck::check_type_defn
101: 0x7f2e5a4bdde8 - rustc_hir_analysis[efec7ea34622ed25]::check::wfcheck::check_well_formed
102: 0x7f2e5982bfcc - rustc_query_impl[b274d6131f7b1f90]::plumbing::__rust_begin_short_backtrace::>
103: 0x7f2e5a075ce6 - rustc_query_system[d3399df1ed0f61e2]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[b274d6131f7b1f90]::plumbing::QueryCtxt, false>
104: 0x7f2e5a075a34 - rustc_query_impl[b274d6131f7b1f90]::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
105: 0x7f2e5ac0f14c - rustc_data_structures[c37d28736990e336]::sync::par_for_each_in::<&[rustc_hir[7d2fcfc22a87f39c]::hir::ImplItemId], ::par_impl_items::{closure#0}>
106: 0x7f2e5ac0efea - rustc_hir_analysis[efec7ea34622ed25]::check::wfcheck::check_mod_type_wf
107: 0x7f2e5a4a0f7c - rustc_query_impl[b274d6131f7b1f90]::plumbing::__rust_begin_short_backtrace::>
108: 0x7f2e5a4a0f5e - >::call_once
109: 0x7f2e59f8a7df - rustc_query_system[d3399df1ed0f61e2]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[b274d6131f7b1f90]::plumbing::QueryCtxt, false>
110: 0x7f2e5b1ad5e4 - rustc_query_impl[b274d6131f7b1f90]::query_impl::check_mod_type_wf::get_query_non_incr::__rust_end_short_backtrace
111: 0x7f2e5ac79947 - rustc_data_structures[c37d28736990e336]::sync::par_for_each_in::<&[rustc_hir[7d2fcfc22a87f39c]::hir_id::OwnerId], ::par_for_each_module::{closure#0}>
112: 0x7f2e5ac79717 - ::track_errors::
113: 0x7f2e5ac775df - rustc_hir_analysis[efec7ea34622ed25]::check_crate
114: 0x7f2e5ac6e64a - rustc_interface[b03e5b36acd0a493]::passes::analysis
115: 0x7f2e5acf958a - rustc_query_impl[b274d6131f7b1f90]::plumbing::__rust_begin_short_backtrace::>
116: 0x7f2e5acf9579 - >::call_once
117: 0x7f2e5ae92e88 - rustc_query_system[d3399df1ed0f61e2]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[b274d6131f7b1f90]::plumbing::QueryCtxt, false>
118: 0x7f2e5ae92c59 - rustc_query_impl[b274d6131f7b1f90]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
119: 0x7f2e5aa62545 - ::enter::>
120: 0x7f2e5aa61b72 - ::enter::, rustc_span[ffa356b4eef30eb1]::ErrorGuaranteed>>
121: 0x7f2e5aa58885 - rustc_span[ffa356b4eef30eb1]::set_source_map::, rustc_interface[b03e5b36acd0a493]::interface::run_compiler, rustc_driver_impl[e2bfb106dcd1f64f]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
122: 0x7f2e5aa582f6 - >::set::, rustc_driver_impl[e2bfb106dcd1f64f]::run_compiler::{closure#1}>::{closure#0}, core[1877eeee917502d9]::result::Result<(), rustc_span[ffa356b4eef30eb1]::ErrorGuaranteed>>
123: 0x7f2e5aa578bc - std[c4949d010b2b12f5]::sys_common::backtrace::__rust_begin_short_backtrace::, rustc_driver_impl[e2bfb106dcd1f64f]::run_compiler::{closure#1}>::{closure#0}, core[1877eeee917502d9]::result::Result<(), rustc_span[ffa356b4eef30eb1]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[1877eeee917502d9]::result::Result<(), rustc_span[ffa356b4eef30eb1]::ErrorGuaranteed>>
124: 0x7f2e5aa57685 - <::spawn_unchecked_, rustc_driver_impl[e2bfb106dcd1f64f]::run_compiler::{closure#1}>::{closure#0}, core[1877eeee917502d9]::result::Result<(), rustc_span[ffa356b4eef30eb1]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[1877eeee917502d9]::result::Result<(), rustc_span[ffa356b4eef30eb1]::ErrorGuaranteed>>::{closure#1} as core[1877eeee917502d9]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
125: 0x7f2e58571315 - as core::ops::function::FnOnce>::call_once::ha34cb32f4acd27b7
at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/alloc/src/boxed.rs:2010:9
126: 0x7f2e58571315 - as core::ops::function::FnOnce>::call_once::h309fb4796a356ecf
at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/alloc/src/boxed.rs:2010:9
127: 0x7f2e58571315 - std::sys::unix::thread::Thread::new::thread_start::h947cced02a86e329
at /rustc/e4cd1610067501fa4d347eba7b18f77137dbbf48/library/std/src/sys/unix/thread.rs:108:17
128: 0x7f2e5830444b -
129: 0x7f2e58387e40 -
130: 0x0 -
error: 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.72.0-nightly (e4cd16100 2023-07-05) running on x86_64-unknown-linux-gnu
query stack during panic:
#0 [typeck] type-checking `Foo::{constant#0}`
#1 [thir_body] building THIR for `Foo::{constant#0}`
#2 [check_match] match-checking `Foo::{constant#0}`
#3 [mir_built] building MIR for `Foo::{constant#0}`
#4 [unsafety_check_result] unsafety-checking `Foo::{constant#0}`
#5 [mir_const] preparing `Foo::{constant#0}` for borrow checking
#6 [mir_const_qualif] const checking `Foo::{constant#0}`
#7 [mir_promoted] promoting constants in MIR for `Foo::{constant#0}`
#8 [mir_borrowck] borrow-checking `Foo::{constant#0}`
#9 [mir_drops_elaborated_and_const_checked] elaborating drops for `Foo::{constant#0}`
#10 [mir_for_ctfe] caching mir of `Foo::{constant#0}` for CTFE
#11 [eval_to_allocation_raw] const-evaluating + checking `Foo::{constant#0}`
#12 [eval_to_allocation_raw] const-evaluating + checking `Foo::{constant#0}`
#13 [eval_to_valtree] evaluating type-level constant
#14 [param_env] computing normalized predicates of `Foo`
#15 [check_well_formed] checking that `Foo` is well-formed
#16 [check_mod_type_wf] checking that types are well-formed in top-level module
#17 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to previous error
For more information about this error, try `rustc --explain E0601`.
```