Open MJE10 opened 7 months ago
I get a slightly different error on nightly:
error[E0282]: type annotations needed
--> src/main.rs:17:5
|
17 | app.update(0u32);
| ^^^^^^^^^^^^^^^^ cannot infer type for type parameter `T`
thread 'rustc' panicked at compiler/rustc_hir_typeck/src/demand.rs:403:52:
index out of bounds: the len is 1 but the index is 1
Code
Cargo.toml
Meta
I could not build this example on nightly due to a broken feature in a dependency.
rustc --version --verbose
:Error output
Backtrace
``` note: delayed at compiler\rustc_hir_typeck\src\fn_ctxt\checks.rs:525:22 0: std::backtrace::Backtrace::force_capture 1: std::backtrace::Backtrace::capture 2:::emit_diagnostic
3: <::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor>::visit_ty
4: ::blame_specific_expr_if_possible
5: ::probe_instantiate_query_response
6: ::demand_coerce
7: ::check_struct_path
8: ::demand_coerce
9: ::demand_coerce
10: ::borrow
11: rustc_hir_typeck::typeck
12: ::load_side_effects
13: rustc_query_impl::query_callbacks
14: ::load_side_effects
15: ::load_side_effects
16: ::visit_ty
17: rustc_hir_analysis::check_crate
18: rustc_interface::passes::analysis
19: rustc_query_impl::profiling_support::alloc_self_profile_query_strings
20: rustc_query_impl::dynamic_queries
21: rustc_query_impl::profiling_support::alloc_self_profile_query_strings
22: rustc_query_impl::profiling_support::alloc_self_profile_query_strings
23: rustc_query_impl::profiling_support::alloc_self_profile_query_strings
24: rustc_driver_impl::args::arg_expand_all
25: rustc_driver_impl::args::arg_expand_all
26: rustc_driver_impl::args::arg_expand_all
27: rustc_driver_impl::args::arg_expand_all
28: rustc_driver_impl::args::arg_expand_all
29: rustc_driver_impl::args::arg_expand_all
30: std::sys::windows::thread::Thread::new
31: BaseThreadInitThunk
32: RtlUserThreadStart
```