Description
This happens with the latest nightly 2022-05-27 and 2022-05-14
Code
https://github.com/gilescope/dotsamatown/tree/broke-rustc
fn process_extrisic
had 6 args and I was de-yoloing the code to have only 4 args when rustc got the right hump.
src/datasource.rs line 810, if I change that call to process_extrinsic to have the right number (and type) of arguments then rustc gets happy again:
let entity = process_extrisic(&relay_id,
ex_slice,&extrinsic, DotUrl{ extrinsic: Some(i as u32), ..block_doturl.clone()}).await;
Sorry my yolo code broke rustc! I suspect it's pretty obvious what's broken. I don't think this is a subtle thing though I guess it probably is the fact that it's an async fn that helps brake it.
Error output
Checking bevy_app v0.1.0 (/home/gilescope/git/bevy_webgl_template)
warning: unused import: `FlyCam`
--> src/movement.rs:16:19
|
16 | use bevy_flycam::{FlyCam, MovementSettings};
| ^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused import: `subxt::ClientBuilder`
--> src/main.rs:30:5
|
30 | use subxt::ClientBuilder;
| ^^^^^^^^^^^^^^^^^^^^
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_typeck/src/check/fn_ctxt/checks.rs:433:78
stack backtrace:
0: rust_begin_unwind
at /rustc/490324f7b29d5f1a1e063a563045d790091ed639/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at /rustc/490324f7b29d5f1a1e063a563045d790091ed639/library/core/src/panicking.rs:142:14
2: core::panicking::panic
at /rustc/490324f7b29d5f1a1e063a563045d790091ed639/library/core/src/panicking.rs:48:5
3: <alloc::vec::drain_filter::DrainFilter<rustc_typeck::check::fn_ctxt::arg_matrix::Error, <rustc_typeck::check::fn_ctxt::FnCtxt>::check_argument_types::{closure#4}> as core::ops::drop::Drop>::drop
4: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_argument_types
5: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_call
6: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
7: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_argument_types
8: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_call
9: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
10: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
11: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_match
12: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
13: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
14: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_stmt
15: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
16: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
17: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
18: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
19: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
20: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
21: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
22: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
23: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_match
24: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
25: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
26: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_stmt
27: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
28: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
29: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
30: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_match
31: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
32: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
33: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
34: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
35: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_stmt
36: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
37: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
38: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
39: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
40: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
41: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
42: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
43: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
44: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
45: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
46: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
47: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
48: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
49: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
50: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
51: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
52: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
53: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
54: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_stmt
55: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
56: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
57: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
58: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
59: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
60: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
61: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
62: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
63: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
64: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
65: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
66: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
67: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
68: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_stmt
69: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
70: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
71: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
72: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
73: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
74: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
75: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
76: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
77: rustc_typeck::check::check::check_fn
78: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_closure
79: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
80: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_argument_types
81: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_call
82: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
83: <rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
84: rustc_typeck::check::check::check_fn
85: <rustc_infer::infer::InferCtxtBuilder>::enter::<&rustc_middle::ty::context::TypeckResults, <rustc_typeck::check::inherited::InheritedBuilder>::enter<rustc_typeck::check::typeck_with_fallback<rustc_typeck::check::typeck::{closure#0}>::{closure#1}, &rustc_middle::ty::context::TypeckResults>::{closure#0}>
86: rustc_typeck::check::typeck
87: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId, &rustc_middle::ty::context::TypeckResults>
88: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::LocalDefId, &rustc_middle::ty::context::TypeckResults>>
89: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::typeck
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.63.0-nightly (490324f7b 2022-05-26) running on x86_64-unknown-linux-gnu
note: compiler flags: --crate-type bin -C opt-level=1 -C embed-bitcode=no -C debuginfo=1 -C debug-assertions=on -C linker=clang -C incremental -Z share-generics=y
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
#0 [typeck] type-checking `datasource::watch_blocks`
#1 [mir_built] building MIR for `datasource::watch_blocks`
#2 [unsafety_check_result] unsafety-checking `datasource::watch_blocks`
#3 [mir_const] processing MIR for `datasource::watch_blocks`
#4 [mir_promoted] processing `datasource::watch_blocks`
#5 [mir_borrowck] borrow-checking `datasource::watch_blocks`
#6 [type_of] computing type of `datasource::watch_blocks::{opaque#0}`
#7 [check_mod_item_types] checking item types in module `datasource`
#8 [analysis] running analysis passes on this crate
end of query stack