Skip to content

thread rustc panicked at Box<dyn Any> #97885

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
LaoLittle opened this issue Jun 8, 2022 · 6 comments
Closed

thread rustc panicked at Box<dyn Any> #97885

LaoLittle opened this issue Jun 8, 2022 · 6 comments
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@LaoLittle
Copy link

Code

use std::{io::{Read, self, Write}, fs::File};

use skia_safe::{Surface, Bitmap, IRect, IPoint};

fn main() -> io::Result<()> {
    let mut surface = Surface::new_raster_n32_premul((1,1)).unwrap();

    let canvas = surface.canvas();

    let bitmap = Bitmap::new();

    // this makes compiler panic
    surface.read_pixels_to_bitmap(&bitmap, surface.image_info().into());

    let data = surface.image_snapshot().encode_to_data(skia_safe::EncodedImageFormat::PNG).unwrap();

    let b = data.as_bytes();
    let mut f = File::create("output.png")?;
    f.write_all(b)?;
    Ok(())
}

Meta

rustc --version --verbose:

rustc 1.63.0-nightly (fee3a459d 2022-06-05)
binary: rustc
commit-hash: fee3a459dd6aba8e34a5b99f0fbcb4218a1e2401
commit-date: 2022-06-05
host: x86_64-unknown-linux-gnu
release: 1.63.0-nightly
LLVM version: 14.0.5

cat /proc/version

Linux version 5.15.0-35-generic (buildd@lcy02-amd64-029) (gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #36-Ubuntu SMP Sat May 21 02:24:07 UTC 2022

Error output

error: internal compiler error: compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs:856:33: unexpected path: def=skia_safe::RCHandle substs=[skia_bindings::bindings::SkSurface] path=Path { span: src/main.rs:6:23: 6:30 (#0), res: Def(TyAlias, DefId(20:5421 ~ skia_safe[b049]::core::surface::Surface)), segments: [PathSegment { ident: Surface#0, hir_id: Some(HirId { owner: DefId(0:30 ~ skia[a9b6]::main), local_id: 3 }), res: Some(Err), args: None, infer_args: true }] }

/** backtrace */

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 (fee3a459d 2022-06-05) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type bin -C opt-level=3 -C lto=thin -C codegen-units=1 -C strip=symbols

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [typeck] type-checking `main`
#1 [typeck_item_bodies] type-checking all item bodies
#2 [analysis] running analysis passes on this crate
end of query stack
Backtrace

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/fee3a459dd6aba8e34a5b99f0fbcb4218a1e2401/compiler/rustc_errors/src/lib.rs:1335:9
stack backtrace:
   0:     0x7f4ef889e06d - std::backtrace_rs::backtrace::libunwind::trace::h8c7b7f7486890cf2
                               at /rustc/fee3a459dd6aba8e34a5b99f0fbcb4218a1e2401/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f4ef889e06d - std::backtrace_rs::backtrace::trace_unsynchronized::h912b0ae2b2cb4980
                               at /rustc/fee3a459dd6aba8e34a5b99f0fbcb4218a1e2401/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f4ef889e06d - std::sys_common::backtrace::_print_fmt::h1488392e9a1a8abb
                               at /rustc/fee3a459dd6aba8e34a5b99f0fbcb4218a1e2401/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7f4ef889e06d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h73aa6aeec3b2c391
                               at /rustc/fee3a459dd6aba8e34a5b99f0fbcb4218a1e2401/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7f4ef88f9dfc - core::fmt::write::hdb7aec85a9eb67f0
                               at /rustc/fee3a459dd6aba8e34a5b99f0fbcb4218a1e2401/library/core/src/fmt/mod.rs:1196:17
   5:     0x7f4ef888f761 - std::io::Write::write_fmt::h3b9ea19290d1fa9f
                               at /rustc/fee3a459dd6aba8e34a5b99f0fbcb4218a1e2401/library/std/src/io/mod.rs:1654:15
   6:     0x7f4ef88a0d45 - std::sys_common::backtrace::_print::hdc7b1208514711b5
                               at /rustc/fee3a459dd6aba8e34a5b99f0fbcb4218a1e2401/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7f4ef88a0d45 - std::sys_common::backtrace::print::h1a86855974f0d5da
                               at /rustc/fee3a459dd6aba8e34a5b99f0fbcb4218a1e2401/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7f4ef88a0d45 - std::panicking::default_hook::{{closure}}::hef07b2c0620cde5c
                               at /rustc/fee3a459dd6aba8e34a5b99f0fbcb4218a1e2401/library/std/src/panicking.rs:295:22
   9:     0x7f4ef88a0a66 - std::panicking::default_hook::h45641f1653b5abcc
                               at /rustc/fee3a459dd6aba8e34a5b99f0fbcb4218a1e2401/library/std/src/panicking.rs:314:9
  10:     0x7f4ef90f9b41 - rustc_driver[c1e99685c2db73b5]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f4ef88a141a - std::panicking::rust_panic_with_hook::h8217f754805ee47a
                               at /rustc/fee3a459dd6aba8e34a5b99f0fbcb4218a1e2401/library/std/src/panicking.rs:702:17
  12:     0x7f4efa1969a1 - std[d1db955791848c1d]::panicking::begin_panic::<rustc_errors[59cc4a995e9ce9c3]::ExplicitBug>::{closure#0}
  13:     0x7f4efa1963b6 - std[d1db955791848c1d]::sys_common::backtrace::__rust_end_short_backtrace::<std[d1db955791848c1d]::panicking::begin_panic<rustc_errors[59cc4a995e9ce9c3]::ExplicitBug>::{closure#0}, !>
  14:     0x7f4efa112db6 - std[d1db955791848c1d]::panicking::begin_panic::<rustc_errors[59cc4a995e9ce9c3]::ExplicitBug>
  15:     0x7f4efa13f9e6 - std[d1db955791848c1d]::panic::panic_any::<rustc_errors[59cc4a995e9ce9c3]::ExplicitBug>
  16:     0x7f4efa1385a5 - <rustc_errors[59cc4a995e9ce9c3]::HandlerInner>::bug::<&alloc[be390ceb573214bc]::string::String>
  17:     0x7f4efa136900 - <rustc_errors[59cc4a995e9ce9c3]::Handler>::bug::<&alloc[be390ceb573214bc]::string::String>
  18:     0x7f4efa19395d - rustc_middle[a2306e76caef41e6]::ty::context::tls::with_opt::<rustc_middle[a2306e76caef41e6]::util::bug::opt_span_bug_fmt<rustc_span[854224d9214a59e0]::span_encoding::Span>::{closure#0}, ()>
  19:     0x7f4efa193a56 - rustc_middle[a2306e76caef41e6]::util::bug::opt_span_bug_fmt::<rustc_span[854224d9214a59e0]::span_encoding::Span>
  20:     0x7f4efa1939d3 - rustc_middle[a2306e76caef41e6]::util::bug::bug_fmt
  21:     0x7f4efa067f3b - <rustc_infer[3a0c873f3e819148]::infer::error_reporting::need_type_info::FindInferSourceVisitor>::path_inferred_subst_iter
  22:     0x7f4efa0684c3 - <rustc_infer[3a0c873f3e819148]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[738cb5ccbd463b52]::intravisit::Visitor>::visit_expr
  23:     0x7f4efa06834c - <rustc_infer[3a0c873f3e819148]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[738cb5ccbd463b52]::intravisit::Visitor>::visit_expr
  24:     0x7f4efa081d72 - rustc_hir[738cb5ccbd463b52]::intravisit::walk_expr::<rustc_infer[3a0c873f3e819148]::infer::error_reporting::need_type_info::FindInferSourceVisitor>
  25:     0x7f4efa06835e - <rustc_infer[3a0c873f3e819148]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[738cb5ccbd463b52]::intravisit::Visitor>::visit_expr
  26:     0x7f4efa07e9ec - rustc_hir[738cb5ccbd463b52]::intravisit::walk_local::<rustc_infer[3a0c873f3e819148]::infer::error_reporting::need_type_info::FindInferSourceVisitor>
  27:     0x7f4efa067fc8 - <rustc_infer[3a0c873f3e819148]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[738cb5ccbd463b52]::intravisit::Visitor>::visit_local
  28:     0x7f4efa07e837 - rustc_hir[738cb5ccbd463b52]::intravisit::walk_block::<rustc_infer[3a0c873f3e819148]::infer::error_reporting::need_type_info::FindInferSourceVisitor>
  29:     0x7f4efa06835e - <rustc_infer[3a0c873f3e819148]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[738cb5ccbd463b52]::intravisit::Visitor>::visit_expr
  30:     0x7f4efa027104 - <rustc_infer[3a0c873f3e819148]::infer::InferCtxt>::emit_inference_failure_err
  31:     0x7f4ef9f79882 - <rustc_infer[3a0c873f3e819148]::infer::InferCtxt as rustc_trait_selection[3a09bc3df28e5ea6]::traits::error_reporting::InferCtxtPrivExt>::maybe_report_ambiguity
  32:     0x7f4ef9f6d427 - <rustc_infer[3a0c873f3e819148]::infer::InferCtxt as rustc_trait_selection[3a09bc3df28e5ea6]::traits::error_reporting::InferCtxtExt>::report_fulfillment_errors
  33:     0x7f4efa6bc874 - <rustc_infer[3a0c873f3e819148]::infer::InferCtxtBuilder>::enter::<&rustc_middle[a2306e76caef41e6]::ty::context::TypeckResults, <rustc_typeck[ccfc992085d383a]::check::inherited::InheritedBuilder>::enter<rustc_typeck[ccfc992085d383a]::check::typeck_with_fallback<rustc_typeck[ccfc992085d383a]::check::typeck::{closure#0}>::{closure#1}, &rustc_middle[a2306e76caef41e6]::ty::context::TypeckResults>::{closure#0}>
  34:     0x7f4efa64eb0a - rustc_typeck[ccfc992085d383a]::check::typeck
  35:     0x7f4efb748620 - <rustc_query_system[e14b08b5f6d11aca]::dep_graph::graph::DepGraph<rustc_middle[a2306e76caef41e6]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[a2306e76caef41e6]::ty::context::TyCtxt, rustc_span[854224d9214a59e0]::def_id::LocalDefId, &rustc_middle[a2306e76caef41e6]::ty::context::TypeckResults>
  36:     0x7f4efac708b0 - rustc_query_system[e14b08b5f6d11aca]::query::plumbing::try_execute_query::<rustc_query_impl[43f62f427a47b107]::plumbing::QueryCtxt, rustc_query_system[e14b08b5f6d11aca]::query::caches::DefaultCache<rustc_span[854224d9214a59e0]::def_id::LocalDefId, &rustc_middle[a2306e76caef41e6]::ty::context::TypeckResults>>
  37:     0x7f4efab9fabe - <rustc_query_impl[43f62f427a47b107]::Queries as rustc_middle[a2306e76caef41e6]::ty::query::QueryEngine>::typeck
  38:     0x7f4efa70e3d8 - <rustc_middle[a2306e76caef41e6]::hir::map::Map>::par_body_owners::<rustc_typeck[ccfc992085d383a]::check::typeck_item_bodies::{closure#0}>
  39:     0x7f4efb50616c - rustc_typeck[ccfc992085d383a]::check::typeck_item_bodies
  40:     0x7f4efb767cf3 - <rustc_query_system[e14b08b5f6d11aca]::dep_graph::graph::DepGraph<rustc_middle[a2306e76caef41e6]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[a2306e76caef41e6]::ty::context::TyCtxt, (), ()>
  41:     0x7f4efb8137a5 - rustc_query_system[e14b08b5f6d11aca]::query::plumbing::try_execute_query::<rustc_query_impl[43f62f427a47b107]::plumbing::QueryCtxt, rustc_query_system[e14b08b5f6d11aca]::query::caches::DefaultCache<(), ()>>
  42:     0x7f4efb83dcf1 - rustc_query_system[e14b08b5f6d11aca]::query::plumbing::get_query::<rustc_query_impl[43f62f427a47b107]::queries::typeck_item_bodies, rustc_query_impl[43f62f427a47b107]::plumbing::QueryCtxt>
  43:     0x7f4efb53cb13 - <rustc_session[76012b897df2a22f]::session::Session>::time::<(), rustc_typeck[ccfc992085d383a]::check_crate::{closure#7}>
  44:     0x7f4efb52973b - rustc_typeck[ccfc992085d383a]::check_crate
  45:     0x7f4efb2e4df7 - rustc_interface[559070acee21b240]::passes::analysis
  46:     0x7f4efb7630c5 - <rustc_query_system[e14b08b5f6d11aca]::dep_graph::graph::DepGraph<rustc_middle[a2306e76caef41e6]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[a2306e76caef41e6]::ty::context::TyCtxt, (), core[209b93b5c8d61a70]::result::Result<(), rustc_errors[59cc4a995e9ce9c3]::ErrorGuaranteed>>
  47:     0x7f4efb808c0d - rustc_query_system[e14b08b5f6d11aca]::query::plumbing::try_execute_query::<rustc_query_impl[43f62f427a47b107]::plumbing::QueryCtxt, rustc_query_system[e14b08b5f6d11aca]::query::caches::DefaultCache<(), core[209b93b5c8d61a70]::result::Result<(), rustc_errors[59cc4a995e9ce9c3]::ErrorGuaranteed>>>
  48:     0x7f4efb8502ae - rustc_query_system[e14b08b5f6d11aca]::query::plumbing::get_query::<rustc_query_impl[43f62f427a47b107]::queries::analysis, rustc_query_impl[43f62f427a47b107]::plumbing::QueryCtxt>
  49:     0x7f4efb2a1ff7 - <rustc_interface[559070acee21b240]::passes::QueryContext>::enter::<rustc_driver[c1e99685c2db73b5]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[209b93b5c8d61a70]::result::Result<(), rustc_errors[59cc4a995e9ce9c3]::ErrorGuaranteed>>
  50:     0x7f4efb28c03f - <rustc_interface[559070acee21b240]::interface::Compiler>::enter::<rustc_driver[c1e99685c2db73b5]::run_compiler::{closure#1}::{closure#2}, core[209b93b5c8d61a70]::result::Result<core[209b93b5c8d61a70]::option::Option<rustc_interface[559070acee21b240]::queries::Linker>, rustc_errors[59cc4a995e9ce9c3]::ErrorGuaranteed>>
  51:     0x7f4efb2b5a0f - rustc_span[854224d9214a59e0]::with_source_map::<core[209b93b5c8d61a70]::result::Result<(), rustc_errors[59cc4a995e9ce9c3]::ErrorGuaranteed>, rustc_interface[559070acee21b240]::interface::create_compiler_and_run<core[209b93b5c8d61a70]::result::Result<(), rustc_errors[59cc4a995e9ce9c3]::ErrorGuaranteed>, rustc_driver[c1e99685c2db73b5]::run_compiler::{closure#1}>::{closure#1}>
  52:     0x7f4efb28ced2 - <scoped_tls[74c521fe137ff8f6]::ScopedKey<rustc_span[854224d9214a59e0]::SessionGlobals>>::set::<rustc_interface[559070acee21b240]::interface::run_compiler<core[209b93b5c8d61a70]::result::Result<(), rustc_errors[59cc4a995e9ce9c3]::ErrorGuaranteed>, rustc_driver[c1e99685c2db73b5]::run_compiler::{closure#1}>::{closure#0}, core[209b93b5c8d61a70]::result::Result<(), rustc_errors[59cc4a995e9ce9c3]::ErrorGuaranteed>>
  53:     0x7f4efb2a268f - std[d1db955791848c1d]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[559070acee21b240]::util::run_in_thread_pool_with_globals<rustc_interface[559070acee21b240]::interface::run_compiler<core[209b93b5c8d61a70]::result::Result<(), rustc_errors[59cc4a995e9ce9c3]::ErrorGuaranteed>, rustc_driver[c1e99685c2db73b5]::run_compiler::{closure#1}>::{closure#0}, core[209b93b5c8d61a70]::result::Result<(), rustc_errors[59cc4a995e9ce9c3]::ErrorGuaranteed>>::{closure#0}, core[209b93b5c8d61a70]::result::Result<(), rustc_errors[59cc4a995e9ce9c3]::ErrorGuaranteed>>
  54:     0x7f4efb2a27e9 - <<std[d1db955791848c1d]::thread::Builder>::spawn_unchecked_<rustc_interface[559070acee21b240]::util::run_in_thread_pool_with_globals<rustc_interface[559070acee21b240]::interface::run_compiler<core[209b93b5c8d61a70]::result::Result<(), rustc_errors[59cc4a995e9ce9c3]::ErrorGuaranteed>, rustc_driver[c1e99685c2db73b5]::run_compiler::{closure#1}>::{closure#0}, core[209b93b5c8d61a70]::result::Result<(), rustc_errors[59cc4a995e9ce9c3]::ErrorGuaranteed>>::{closure#0}, core[209b93b5c8d61a70]::result::Result<(), rustc_errors[59cc4a995e9ce9c3]::ErrorGuaranteed>>::{closure#1} as core[209b93b5c8d61a70]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  55:     0x7f4ef88ab343 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h6a4b26a3769f70a6
                               at /rustc/fee3a459dd6aba8e34a5b99f0fbcb4218a1e2401/library/alloc/src/boxed.rs:1951:9
  56:     0x7f4ef88ab343 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hf1c29d8811e283d3
                               at /rustc/fee3a459dd6aba8e34a5b99f0fbcb4218a1e2401/library/alloc/src/boxed.rs:1951:9
  57:     0x7f4ef88ab343 - std::sys::unix::thread::Thread::new::thread_start::h93bb7626b9b4de9a
                               at /rustc/fee3a459dd6aba8e34a5b99f0fbcb4218a1e2401/library/std/src/sys/unix/thread.rs:108:17
  58:     0x7f4ef866cb43 - start_thread
                               at ./nptl/./nptl/pthread_create.c:442:8
  59:     0x7f4ef86fea00 - clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  60:                0x0 - <unknown>

@LaoLittle LaoLittle added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 8, 2022
@LaoLittle LaoLittle changed the title thread 'rustc' panicked at 'Box<dyn Any>' thread rustc panicked at Box<dyn Any> Jun 8, 2022
@infiniwave
Copy link

infiniwave commented Jun 8, 2022

Same error here, but with aes_gcm library.

error: internal compiler error: compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs:856:33: unexpected path: def=aes_gcm::aead::generic_array::GenericArray substs=[_, _] path=Path { span: src/services/encryption.rs:53:25: 53:30 (#0), res: Def(TyAlias, DefId(180:97 ~ aes_gcm[7ab9]::Nonce)), segments: [PathSegment { ident: Nonce#0, hir_id: Some(HirId { owner: DefId(0:223 ~ easylink[c894]::services::encryption::encode), local_id: 61 }), res: Some(Err), args: None, infer_args: true }] }

/* backtrace */

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 (50b00252a 2022-06-06) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C incremental

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [typeck] type-checking `services::encryption::encode`
#1 [typeck_item_bodies] type-checking all item bodies
#2 [analysis] running analysis passes on this crate
end of query stack
Backtrace
thread 'rustc' panicked at 'Box<dyn Any>', /rustc/50b00252aeb77b10db04d65dc9e12ce758def4b5/compiler/rustc_errors/src/lib.rs:1335:9
stack backtrace:
   0:     0x7f1c1ec9e09d - std::backtrace_rs::backtrace::libunwind::trace::h2a8892c156585d66
                               at /rustc/50b00252aeb77b10db04d65dc9e12ce758def4b5/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f1c1ec9e09d - std::backtrace_rs::backtrace::trace_unsynchronized::h918c401bc86eed40
                               at /rustc/50b00252aeb77b10db04d65dc9e12ce758def4b5/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f1c1ec9e09d - std::sys_common::backtrace::_print_fmt::h2a52b4cb52dc84fb
                               at /rustc/50b00252aeb77b10db04d65dc9e12ce758def4b5/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7f1c1ec9e09d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h2f5ce3ea50e5b1d6
                               at /rustc/50b00252aeb77b10db04d65dc9e12ce758def4b5/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7f1c1ecf9e2c - core::fmt::write::h48a5b18f44037270
                               at /rustc/50b00252aeb77b10db04d65dc9e12ce758def4b5/library/core/src/fmt/mod.rs:1196:17
   5:     0x7f1c1ec8f791 - std::io::Write::write_fmt::h1d1b08935a2fcf4b
                               at /rustc/50b00252aeb77b10db04d65dc9e12ce758def4b5/library/std/src/io/mod.rs:1654:15
   6:     0x7f1c1eca0d75 - std::sys_common::backtrace::_print::h46d4f4f2d0dbcce0
                               at /rustc/50b00252aeb77b10db04d65dc9e12ce758def4b5/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7f1c1eca0d75 - std::sys_common::backtrace::print::h8334e6fa27a1dde4
                               at /rustc/50b00252aeb77b10db04d65dc9e12ce758def4b5/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7f1c1eca0d75 - std::panicking::default_hook::{{closure}}::hc13c7ff820b0fe22
                               at /rustc/50b00252aeb77b10db04d65dc9e12ce758def4b5/library/std/src/panicking.rs:295:22
   9:     0x7f1c1eca0a96 - std::panicking::default_hook::h100ba67c99329739
                               at /rustc/50b00252aeb77b10db04d65dc9e12ce758def4b5/library/std/src/panicking.rs:314:9
  10:     0x7f1c1f4f96c1 - rustc_driver[30390a19e428bc19]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f1c064970c3 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hcd4ded0cbdafbf79
                               at /rustc/50b00252aeb77b10db04d65dc9e12ce758def4b5/library/alloc/src/boxed.rs:1965:9
  12:     0x7f1c064bee5d - proc_macro::bridge::client::<impl proc_macro::bridge::Bridge>::enter::{{closure}}::{{closure}}::h79d97323e75efcc9
                               at /rustc/50b00252aeb77b10db04d65dc9e12ce758def4b5/library/proc_macro/src/bridge/client.rs:339:21
  13:     0x7f1c1eca144a - std::panicking::rust_panic_with_hook::h0a6a04da5fd1d45f
                               at /rustc/50b00252aeb77b10db04d65dc9e12ce758def4b5/library/std/src/panicking.rs:702:17
  14:     0x7f1c20593d71 - std[41be3fa6aba1786e]::panicking::begin_panic::<rustc_errors[e8101b8b045aac39]::ExplicitBug>::{closure#0}
  15:     0x7f1c20593786 - std[41be3fa6aba1786e]::sys_common::backtrace::__rust_end_short_backtrace::<std[41be3fa6aba1786e]::panicking::begin_panic<rustc_errors[e8101b8b045aac39]::ExplicitBug>::{closure#0}, !>
  16:     0x7f1c20510036 - std[41be3fa6aba1786e]::panicking::begin_panic::<rustc_errors[e8101b8b045aac39]::ExplicitBug>
  17:     0x7f1c205364a6 - std[41be3fa6aba1786e]::panic::panic_any::<rustc_errors[e8101b8b045aac39]::ExplicitBug>
  18:     0x7f1c20535f45 - <rustc_errors[e8101b8b045aac39]::HandlerInner>::bug::<&alloc[40ba6c0f2dbdab1e]::string::String>
  19:     0x7f1c205342a0 - <rustc_errors[e8101b8b045aac39]::Handler>::bug::<&alloc[40ba6c0f2dbdab1e]::string::String>
  20:     0x7f1c20590d4d - rustc_middle[70296c36ca3d2602]::ty::context::tls::with_opt::<rustc_middle[70296c36ca3d2602]::util::bug::opt_span_bug_fmt<rustc_span[db009ef5852f774a]::span_encoding::Span>::{closure#0}, ()>
  21:     0x7f1c20590e46 - rustc_middle[70296c36ca3d2602]::util::bug::opt_span_bug_fmt::<rustc_span[db009ef5852f774a]::span_encoding::Span>
  22:     0x7f1c20590dc3 - rustc_middle[70296c36ca3d2602]::util::bug::bug_fmt
  23:     0x7f1c2046715b - <rustc_infer[9428db4faa363431]::infer::error_reporting::need_type_info::FindInferSourceVisitor>::path_inferred_subst_iter
  24:     0x7f1c204676e3 - <rustc_infer[9428db4faa363431]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[a412caeb98c40378]::intravisit::Visitor>::visit_expr
  25:     0x7f1c2046756c - <rustc_infer[9428db4faa363431]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[a412caeb98c40378]::intravisit::Visitor>::visit_expr
  26:     0x7f1c2047dc0c - rustc_hir[a412caeb98c40378]::intravisit::walk_local::<rustc_infer[9428db4faa363431]::infer::error_reporting::need_type_info::FindInferSourceVisitor>
  27:     0x7f1c204671e8 - <rustc_infer[9428db4faa363431]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[a412caeb98c40378]::intravisit::Visitor>::visit_local
  28:     0x7f1c2047da57 - rustc_hir[a412caeb98c40378]::intravisit::walk_block::<rustc_infer[9428db4faa363431]::infer::error_reporting::need_type_info::FindInferSourceVisitor>
  29:     0x7f1c2046757e - <rustc_infer[9428db4faa363431]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[a412caeb98c40378]::intravisit::Visitor>::visit_expr
  30:     0x7f1c20481003 - rustc_hir[a412caeb98c40378]::intravisit::walk_expr::<rustc_infer[9428db4faa363431]::infer::error_reporting::need_type_info::FindInferSourceVisitor>
  31:     0x7f1c2046757e - <rustc_infer[9428db4faa363431]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[a412caeb98c40378]::intravisit::Visitor>::visit_expr
  32:     0x7f1c2046757e - <rustc_infer[9428db4faa363431]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[a412caeb98c40378]::intravisit::Visitor>::visit_expr
  33:     0x7f1c20481003 - rustc_hir[a412caeb98c40378]::intravisit::walk_expr::<rustc_infer[9428db4faa363431]::infer::error_reporting::need_type_info::FindInferSourceVisitor>
  34:     0x7f1c2046757e - <rustc_infer[9428db4faa363431]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[a412caeb98c40378]::intravisit::Visitor>::visit_expr
  35:     0x7f1c2046757e - <rustc_infer[9428db4faa363431]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[a412caeb98c40378]::intravisit::Visitor>::visit_expr
  36:     0x7f1c20426284 - <rustc_infer[9428db4faa363431]::infer::InferCtxt>::emit_inference_failure_err
  37:     0x7f1c203790db - <rustc_infer[9428db4faa363431]::infer::InferCtxt as rustc_trait_selection[d0fea7d99d927b2c]::traits::error_reporting::InferCtxtPrivExt>::maybe_report_ambiguity
  38:     0x7f1c2036cd87 - <rustc_infer[9428db4faa363431]::infer::InferCtxt as rustc_trait_selection[d0fea7d99d927b2c]::traits::error_reporting::InferCtxtExt>::report_fulfillment_errors
  39:     0x7f1c20abb094 - <rustc_infer[9428db4faa363431]::infer::InferCtxtBuilder>::enter::<&rustc_middle[70296c36ca3d2602]::ty::context::TypeckResults, <rustc_typeck[a3bfe43d381eec93]::check::inherited::InheritedBuilder>::enter<rustc_typeck[a3bfe43d381eec93]::check::typeck_with_fallback<rustc_typeck[a3bfe43d381eec93]::check::typeck::{closure#0}>::{closure#1}, &rustc_middle[70296c36ca3d2602]::ty::context::TypeckResults>::{closure#0}>
  40:     0x7f1c20a4d2fa - rustc_typeck[a3bfe43d381eec93]::check::typeck
  41:     0x7f1c21b52ad0 - <rustc_query_system[c8ac68b744dd57fa]::dep_graph::graph::DepGraph<rustc_middle[70296c36ca3d2602]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[70296c36ca3d2602]::ty::context::TyCtxt, rustc_span[db009ef5852f774a]::def_id::LocalDefId, &rustc_middle[70296c36ca3d2602]::ty::context::TypeckResults>
  42:     0x7f1c21072b70 - rustc_query_system[c8ac68b744dd57fa]::query::plumbing::try_execute_query::<rustc_query_impl[51e1f4158b96ee22]::plumbing::QueryCtxt, rustc_query_system[c8ac68b744dd57fa]::query::caches::DefaultCache<rustc_span[db009ef5852f774a]::def_id::LocalDefId, &rustc_middle[70296c36ca3d2602]::ty::context::TypeckResults>>
  43:     0x7f1c20f9f03e - <rustc_query_impl[51e1f4158b96ee22]::Queries as rustc_middle[70296c36ca3d2602]::ty::query::QueryEngine>::typeck
  44:     0x7f1c20b0bf98 - <rustc_middle[70296c36ca3d2602]::hir::map::Map>::par_body_owners::<rustc_typeck[a3bfe43d381eec93]::check::typeck_item_bodies::{closure#0}>
  45:     0x7f1c2191174c - rustc_typeck[a3bfe43d381eec93]::check::typeck_item_bodies
  46:     0x7f1c21b721a3 - <rustc_query_system[c8ac68b744dd57fa]::dep_graph::graph::DepGraph<rustc_middle[70296c36ca3d2602]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[70296c36ca3d2602]::ty::context::TyCtxt, (), ()>
  47:     0x7f1c21c1d305 - rustc_query_system[c8ac68b744dd57fa]::query::plumbing::try_execute_query::<rustc_query_impl[51e1f4158b96ee22]::plumbing::QueryCtxt, rustc_query_system[c8ac68b744dd57fa]::query::caches::DefaultCache<(), ()>>
  48:     0x7f1c21c47841 - rustc_query_system[c8ac68b744dd57fa]::query::plumbing::get_query::<rustc_query_impl[51e1f4158b96ee22]::queries::typeck_item_bodies, rustc_query_impl[51e1f4158b96ee22]::plumbing::QueryCtxt>
  49:     0x7f1c21948133 - <rustc_session[f622d47d49ca7e5c]::session::Session>::time::<(), rustc_typeck[a3bfe43d381eec93]::check_crate::{closure#7}>
  50:     0x7f1c21934d5b - rustc_typeck[a3bfe43d381eec93]::check_crate
  51:     0x7f1c216f21c7 - rustc_interface[30bf44ec34e2f97]::passes::analysis
  52:     0x7f1c21b6d575 - <rustc_query_system[c8ac68b744dd57fa]::dep_graph::graph::DepGraph<rustc_middle[70296c36ca3d2602]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[70296c36ca3d2602]::ty::context::TyCtxt, (), core[42e67a1b4ba6212c]::result::Result<(), rustc_errors[e8101b8b045aac39]::ErrorGuaranteed>>
  53:     0x7f1c21c1276d - rustc_query_system[c8ac68b744dd57fa]::query::plumbing::try_execute_query::<rustc_query_impl[51e1f4158b96ee22]::plumbing::QueryCtxt, rustc_query_system[c8ac68b744dd57fa]::query::caches::DefaultCache<(), core[42e67a1b4ba6212c]::result::Result<(), rustc_errors[e8101b8b045aac39]::ErrorGuaranteed>>>
  54:     0x7f1c21c59dfe - rustc_query_system[c8ac68b744dd57fa]::query::plumbing::get_query::<rustc_query_impl[51e1f4158b96ee22]::queries::analysis, rustc_query_impl[51e1f4158b96ee22]::plumbing::QueryCtxt>
  55:     0x7f1c216af547 - <rustc_interface[30bf44ec34e2f97]::passes::QueryContext>::enter::<rustc_driver[30390a19e428bc19]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[42e67a1b4ba6212c]::result::Result<(), rustc_errors[e8101b8b045aac39]::ErrorGuaranteed>>
  56:     0x7f1c2169970f - <rustc_interface[30bf44ec34e2f97]::interface::Compiler>::enter::<rustc_driver[30390a19e428bc19]::run_compiler::{closure#1}::{closure#2}, core[42e67a1b4ba6212c]::result::Result<core[42e67a1b4ba6212c]::option::Option<rustc_interface[30bf44ec34e2f97]::queries::Linker>, rustc_errors[e8101b8b045aac39]::ErrorGuaranteed>>
  57:     0x7f1c216c2d5f - rustc_span[db009ef5852f774a]::with_source_map::<core[42e67a1b4ba6212c]::result::Result<(), rustc_errors[e8101b8b045aac39]::ErrorGuaranteed>, rustc_interface[30bf44ec34e2f97]::interface::create_compiler_and_run<core[42e67a1b4ba6212c]::result::Result<(), rustc_errors[e8101b8b045aac39]::ErrorGuaranteed>, rustc_driver[30390a19e428bc19]::run_compiler::{closure#1}>::{closure#1}>
  58:     0x7f1c2169a5a2 - <scoped_tls[2965e6335b4e6f3e]::ScopedKey<rustc_span[db009ef5852f774a]::SessionGlobals>>::set::<rustc_interface[30bf44ec34e2f97]::interface::run_compiler<core[42e67a1b4ba6212c]::result::Result<(), rustc_errors[e8101b8b045aac39]::ErrorGuaranteed>, rustc_driver[30390a19e428bc19]::run_compiler::{closure#1}>::{closure#0}, core[42e67a1b4ba6212c]::result::Result<(), rustc_errors[e8101b8b045aac39]::ErrorGuaranteed>>
  59:     0x7f1c216afbcf - std[41be3fa6aba1786e]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[30bf44ec34e2f97]::util::run_in_thread_pool_with_globals<rustc_interface[30bf44ec34e2f97]::interface::run_compiler<core[42e67a1b4ba6212c]::result::Result<(), rustc_errors[e8101b8b045aac39]::ErrorGuaranteed>, rustc_driver[30390a19e428bc19]::run_compiler::{closure#1}>::{closure#0}, core[42e67a1b4ba6212c]::result::Result<(), rustc_errors[e8101b8b045aac39]::ErrorGuaranteed>>::{closure#0}, core[42e67a1b4ba6212c]::result::Result<(), rustc_errors[e8101b8b045aac39]::ErrorGuaranteed>>
  60:     0x7f1c216afd39 - <<std[41be3fa6aba1786e]::thread::Builder>::spawn_unchecked_<rustc_interface[30bf44ec34e2f97]::util::run_in_thread_pool_with_globals<rustc_interface[30bf44ec34e2f97]::interface::run_compiler<core[42e67a1b4ba6212c]::result::Result<(), rustc_errors[e8101b8b045aac39]::ErrorGuaranteed>, rustc_driver[30390a19e428bc19]::run_compiler::{closure#1}>::{closure#0}, core[42e67a1b4ba6212c]::result::Result<(), rustc_errors[e8101b8b045aac39]::ErrorGuaranteed>>::{closure#0}, core[42e67a1b4ba6212c]::result::Result<(), rustc_errors[e8101b8b045aac39]::ErrorGuaranteed>>::{closure#1} as core[42e67a1b4ba6212c]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  61:     0x7f1c1ecab373 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::ha070fd431c3387e9
                               at /rustc/50b00252aeb77b10db04d65dc9e12ce758def4b5/library/alloc/src/boxed.rs:1951:9
  62:     0x7f1c1ecab373 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hd87ab2d0201316b5
                               at /rustc/50b00252aeb77b10db04d65dc9e12ce758def4b5/library/alloc/src/boxed.rs:1951:9
  63:     0x7f1c1ecab373 - std::sys::unix::thread::Thread::new::thread_start::ha32118aaa6c8a9be
                               at /rustc/50b00252aeb77b10db04d65dc9e12ce758def4b5/library/std/src/sys/unix/thread.rs:108:17
  64:     0x7f1c1e88c54d - <unknown>
  65:     0x7f1c1e911874 - clone
  66:                0x0 - <unknown>

@infiniwave
Copy link

Function causing this issue:

pub fn encode(buffer: Vec<u8>, compress: bool, encrypt: Option<Aes256Gcm>) -> Vec<u8> {
    if compress {
        let zlib = ZlibEncoder::new(buffer, Compression::best());
        let compressed = zlib.finish().unwrap();
        if encrypt.is_some() {
            let nonce_bytes = random_number(96);
            let nonce = Nonce::from_slice(&nonce_bytes);
            let no_size: &[u8] = &vec_to_array(compressed);
            let encrypted = encrypt.unwrap().encrypt(nonce, no_size).unwrap();
            let result = Vec::new();
            result.append(&mut nonce_bytes);
            result.append(&mut encrypted);
            result
        } else {
            compressed
        }
    } else {
        if encrypt.is_some() {
            let nonce_bytes = random_number(96);
            let nonce = Nonce::from_slice(&nonce_bytes);
            let no_size: &[u8] = &vec_to_array(buffer);
            let encrypted = encrypt.unwrap().encrypt(nonce, no_size).unwrap();
            let result = Vec::new();
            result.append(&mut nonce_bytes);
            result.append(&mut encrypted);
            result
        } else {
            buffer
        }
    }
}

@hkratz
Copy link
Contributor

hkratz commented Jun 8, 2022

Could have been introduced by #89862.

@infiniwave
Copy link

It seems that this issue may be caused by a bug in your code, you can try reverting to nightly-2022-06-02, fixing the errors, then setting it back to latest nightly.

@DzenanJupic
Copy link

I run into the same problem

ICE with 2022-06-07

Meta

rustc 1.63.0-nightly (5435ed691 2022-06-07)
binary: rustc
commit-hash: 5435ed6916a59e8d5acba2149316a841c3905cbd
commit-date: 2022-06-07
host: x86_64-unknown-linux-gnu
release: 1.63.0-nightly
LLVM version: 14.0.5
error: internal compiler error: compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs:856:33: unexpected path: def=app_definition_validator::AppDefinitionValidator substs=['_#0r] path=Path { span: core10-validation/src/app_definition_validator.rs:206:23: 206:27 (#0), res: SelfTy { trait_: None, alias
_to: Some((DefId(0:161 ~ core10_validation[4b7e]::app_definition_validator::{impl#0}), false)) }, segments: [PathSegment { ident: Self#0, hir_id: Some(HirId { owner: DefId(0:181 ~ core10_validation[4b7e]::app_definition_validator::{impl#0}::find_exe_path_merges), local_id: 6 }), res: Some(SelfTy { trait_: None,
 alias_to: Some((DefId(0:161 ~ core10_validation[4b7e]::app_definition_validator::{impl#0}), false)) }), args: None, infer_args: true }] }

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/5435ed6916a59e8d5acba2149316a841c3905cbd/compiler/rustc_errors/src/lib.rs:1334:9
stack backtrace:
   0:     0x7f8f176d309d - std::backtrace_rs::backtrace::libunwind::trace::hee7943ada6bad29e
                               at /rustc/5435ed6916a59e8d5acba2149316a841c3905cbd/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f8f176d309d - std::backtrace_rs::backtrace::trace_unsynchronized::h7ccd83155a46c065
                               at /rustc/5435ed6916a59e8d5acba2149316a841c3905cbd/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f8f176d309d - std::sys_common::backtrace::_print_fmt::hfe24db8e4118fad6
                               at /rustc/5435ed6916a59e8d5acba2149316a841c3905cbd/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7f8f176d309d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h7d03ef0a4b68cd6d
                               at /rustc/5435ed6916a59e8d5acba2149316a841c3905cbd/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7f8f1772ee2c - core::fmt::write::hb36860eff00e9ada
                               at /rustc/5435ed6916a59e8d5acba2149316a841c3905cbd/library/core/src/fmt/mod.rs:1196:17
   5:     0x7f8f176c4831 - std::io::Write::write_fmt::ha4850a1b39c307b1
                               at /rustc/5435ed6916a59e8d5acba2149316a841c3905cbd/library/std/src/io/mod.rs:1654:15
   6:     0x7f8f176d5d75 - std::sys_common::backtrace::_print::hf3ecf36d224b16f3
                               at /rustc/5435ed6916a59e8d5acba2149316a841c3905cbd/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7f8f176d5d75 - std::sys_common::backtrace::print::ha31789107cdf7920
                               at /rustc/5435ed6916a59e8d5acba2149316a841c3905cbd/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7f8f176d5d75 - std::panicking::default_hook::{{closure}}::h1ca420da35ab94ba
                               at /rustc/5435ed6916a59e8d5acba2149316a841c3905cbd/library/std/src/panicking.rs:295:22
   9:     0x7f8f176d5a96 - std::panicking::default_hook::hf7cfd911ca8444f2
                               at /rustc/5435ed6916a59e8d5acba2149316a841c3905cbd/library/std/src/panicking.rs:314:9
  10:     0x7f8f17eab911 - rustc_driver[9b2cc5dd0ee5154e]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f8f0378a4f3 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h6de3841f3a1106fa
                               at /rustc/5435ed6916a59e8d5acba2149316a841c3905cbd/library/alloc/src/boxed.rs:1965:9
  12:     0x7f8f03779cbd - proc_macro::bridge::client::<impl proc_macro::bridge::Bridge>::enter::{{closure}}::{{closure}}::h4325c97845b600e4
                               at /rustc/5435ed6916a59e8d5acba2149316a841c3905cbd/library/proc_macro/src/bridge/client.rs:339:21
  13:     0x7f8f176d644a - std::panicking::rust_panic_with_hook::h8b0eedba7af397b5
                               at /rustc/5435ed6916a59e8d5acba2149316a841c3905cbd/library/std/src/panicking.rs:702:17
  14:     0x7f8f18f47191 - std[a0eb98a96cd1d67b]::panicking::begin_panic::<rustc_errors[f2e3be3759aa4428]::ExplicitBug>::{closure#0}
  15:     0x7f8f18f46ba6 - std[a0eb98a96cd1d67b]::sys_common::backtrace::__rust_end_short_backtrace::<std[a0eb98a96cd1d67b]::panicking::begin_panic<rustc_errors[f2e3be3759aa4428]::ExplicitBug>::{closure#0}, !>
  16:     0x7f8f18ec3476 - std[a0eb98a96cd1d67b]::panicking::begin_panic::<rustc_errors[f2e3be3759aa4428]::ExplicitBug>
  17:     0x7f8f18ee9836 - std[a0eb98a96cd1d67b]::panic::panic_any::<rustc_errors[f2e3be3759aa4428]::ExplicitBug>
  18:     0x7f8f18ee92d5 - <rustc_errors[f2e3be3759aa4428]::HandlerInner>::bug::<&alloc[c44c0bf1429d9201]::string::String>
  19:     0x7f8f18ee7630 - <rustc_errors[f2e3be3759aa4428]::Handler>::bug::<&alloc[c44c0bf1429d9201]::string::String>
  20:     0x7f8f18f4412d - rustc_middle[8ca1ffa4f0d07531]::ty::context::tls::with_opt::<rustc_middle[8ca1ffa4f0d07531]::util::bug::opt_span_bug_fmt<rustc_span[e19345dc80a27759]::span_encoding::Span>::{closure#0}, ()>
  21:     0x7f8f18f44226 - rustc_middle[8ca1ffa4f0d07531]::util::bug::opt_span_bug_fmt::<rustc_span[e19345dc80a27759]::span_encoding::Span>
  22:     0x7f8f18f441a3 - rustc_middle[8ca1ffa4f0d07531]::util::bug::bug_fmt
  23:     0x7f8f18e197cb - <rustc_infer[1b92be4cd5a18007]::infer::error_reporting::need_type_info::FindInferSourceVisitor>::path_inferred_subst_iter
  24:     0x7f8f18e19d53 - <rustc_infer[1b92be4cd5a18007]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[3e81ab229655f335]::intravisit::Visitor>::visit_expr
  25:     0x7f8f18e19bdc - <rustc_infer[1b92be4cd5a18007]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[3e81ab229655f335]::intravisit::Visitor>::visit_expr
  26:     0x7f8f18e19bc7 - <rustc_infer[1b92be4cd5a18007]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[3e81ab229655f335]::intravisit::Visitor>::visit_expr
  27:     0x7f8f18e336d1 - rustc_hir[3e81ab229655f335]::intravisit::walk_expr::<rustc_infer[1b92be4cd5a18007]::infer::error_reporting::need_type_info::FindInferSourceVisitor>
  28:     0x7f8f18e19bee - <rustc_infer[1b92be4cd5a18007]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[3e81ab229655f335]::intravisit::Visitor>::visit_expr
  29:     0x7f8f18e302bc - rustc_hir[3e81ab229655f335]::intravisit::walk_local::<rustc_infer[1b92be4cd5a18007]::infer::error_reporting::need_type_info::FindInferSourceVisitor>
  30:     0x7f8f18e19858 - <rustc_infer[1b92be4cd5a18007]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[3e81ab229655f335]::intravisit::Visitor>::visit_local
  31:     0x7f8f18e30107 - rustc_hir[3e81ab229655f335]::intravisit::walk_block::<rustc_infer[1b92be4cd5a18007]::infer::error_reporting::need_type_info::FindInferSourceVisitor>
  32:     0x7f8f18e19bee - <rustc_infer[1b92be4cd5a18007]::infer::error_reporting::need_type_info::FindInferSourceVisitor as rustc_hir[3e81ab229655f335]::intravisit::Visitor>::visit_expr
  33:     0x7f8f18dd8a74 - <rustc_infer[1b92be4cd5a18007]::infer::InferCtxt>::emit_inference_failure_err
  34:     0x7f8f19384ce4 - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::structurally_resolved_type
  35:     0x7f8f193c9edd - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::lookup_method
  36:     0x7f8f193bb59f - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_expr_kind
  37:     0x7f8f193ba230 - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
  38:     0x7f8f194fa538 - rustc_typeck[65f6cc0eda670a77]::check::check::check_fn
  39:     0x7f8f193b920d - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_expr_closure
  40:     0x7f8f193bd926 - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_expr_kind
  41:     0x7f8f19385ab3 - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_argument_types
  42:     0x7f8f193bbe44 - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_expr_kind
  43:     0x7f8f193ba230 - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
  44:     0x7f8f193bb53c - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_expr_kind
  45:     0x7f8f193ba230 - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
  46:     0x7f8f193a7866 - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_stmt
  47:     0x7f8f193a8ea7 - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_block_with_expected
  48:     0x7f8f193bb4e5 - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_expr_kind
  49:     0x7f8f193ba230 - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
  50:     0x7f8f194fa538 - rustc_typeck[65f6cc0eda670a77]::check::check::check_fn
  51:     0x7f8f193b920d - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_expr_closure
  52:     0x7f8f193bd926 - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_expr_kind
  53:     0x7f8f19385ab3 - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_argument_types
  54:     0x7f8f193bbe44 - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_expr_kind
  55:     0x7f8f193ba230 - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
  56:     0x7f8f193a7d99 - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_stmt
  57:     0x7f8f193a8ea7 - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_block_with_expected
  58:     0x7f8f193bb4e5 - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_expr_kind
  59:     0x7f8f193ba230 - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
  60:     0x7f8f194fa538 - rustc_typeck[65f6cc0eda670a77]::check::check::check_fn
  61:     0x7f8f193b920d - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_expr_closure
  62:     0x7f8f193bd926 - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_expr_kind
  63:     0x7f8f19385ab3 - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_argument_types
  64:     0x7f8f193bbe44 - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_expr_kind
  65:     0x7f8f193ba230 - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
  66:     0x7f8f193bb53c - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_expr_kind
  67:     0x7f8f193ba230 - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
  68:     0x7f8f193a7d99 - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_stmt
  69:     0x7f8f193a8edf - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_block_with_expected
  70:     0x7f8f193bb4e5 - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_expr_kind
  71:     0x7f8f193ba230 - <rustc_typeck[65f6cc0eda670a77]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
  72:     0x7f8f194fa538 - rustc_typeck[65f6cc0eda670a77]::check::check::check_fn
  73:     0x7f8f1946ed67 - <rustc_infer[1b92be4cd5a18007]::infer::InferCtxtBuilder>::enter::<&rustc_middle[8ca1ffa4f0d07531]::ty::context::TypeckResults, <rustc_typeck[65f6cc0eda670a77]::check::inherited::InheritedBuilder>::enter<rustc_typeck[65f6cc0eda670a77]::check::typeck_with_fallback<rustc_typeck[65f6cc0ed
a670a77]::check::typeck::{closure#0}>::{closure#1}, &rustc_middle[8ca1ffa4f0d07531]::ty::context::TypeckResults>::{closure#0}>
  74:     0x7f8f1940300a - rustc_typeck[65f6cc0eda670a77]::check::typeck
  75:     0x7f8f1a501830 - <rustc_query_system[e792b288446fca87]::dep_graph::graph::DepGraph<rustc_middle[8ca1ffa4f0d07531]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[8ca1ffa4f0d07531]::ty::context::TyCtxt, rustc_span[e19345dc80a27759]::def_id::LocalDefId, &rustc_middle[8ca1ffa4f0d07531]::ty::con
text::TypeckResults>
  76:     0x7f8f19a2b0b0 - rustc_query_system[e792b288446fca87]::query::plumbing::try_execute_query::<rustc_query_impl[f4d741971085f907]::plumbing::QueryCtxt, rustc_query_system[e792b288446fca87]::query::caches::DefaultCache<rustc_span[e19345dc80a27759]::def_id::LocalDefId, &rustc_middle[8ca1ffa4f0d07531]::ty::
context::TypeckResults>>
  77:     0x7f8f1995684e - <rustc_query_impl[f4d741971085f907]::Queries as rustc_middle[8ca1ffa4f0d07531]::ty::query::QueryEngine>::typeck
  78:     0x7f8f194031a2 - rustc_typeck[65f6cc0eda670a77]::check::typeck
  79:     0x7f8f1a501830 - <rustc_query_system[e792b288446fca87]::dep_graph::graph::DepGraph<rustc_middle[8ca1ffa4f0d07531]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[8ca1ffa4f0d07531]::ty::context::TyCtxt, rustc_span[e19345dc80a27759]::def_id::LocalDefId, &rustc_middle[8ca1ffa4f0d07531]::ty::con
text::TypeckResults>
  80:     0x7f8f19a2b0b0 - rustc_query_system[e792b288446fca87]::query::plumbing::try_execute_query::<rustc_query_impl[f4d741971085f907]::plumbing::QueryCtxt, rustc_query_system[e792b288446fca87]::query::caches::DefaultCache<rustc_span[e19345dc80a27759]::def_id::LocalDefId, &rustc_middle[8ca1ffa4f0d07531]::ty::
context::TypeckResults>>
  81:     0x7f8f1995684e - <rustc_query_impl[f4d741971085f907]::Queries as rustc_middle[8ca1ffa4f0d07531]::ty::query::QueryEngine>::typeck
  82:     0x7f8f194c1dc8 - <rustc_middle[8ca1ffa4f0d07531]::hir::map::Map>::par_body_owners::<rustc_typeck[65f6cc0eda670a77]::check::typeck_item_bodies::{closure#0}>
  83:     0x7f8f1a2bf70c - rustc_typeck[65f6cc0eda670a77]::check::typeck_item_bodies
  84:     0x7f8f1a521034 - <rustc_query_system[e792b288446fca87]::dep_graph::graph::DepGraph<rustc_middle[8ca1ffa4f0d07531]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[8ca1ffa4f0d07531]::ty::context::TyCtxt, (), ()>
  85:     0x7f8f1a5cc0e5 - rustc_query_system[e792b288446fca87]::query::plumbing::try_execute_query::<rustc_query_impl[f4d741971085f907]::plumbing::QueryCtxt, rustc_query_system[e792b288446fca87]::query::caches::DefaultCache<(), ()>>
  86:     0x7f8f1a5f6371 - rustc_query_system[e792b288446fca87]::query::plumbing::get_query::<rustc_query_impl[f4d741971085f907]::queries::typeck_item_bodies, rustc_query_impl[f4d741971085f907]::plumbing::QueryCtxt>
  87:     0x7f8f1a2f60b3 - <rustc_session[e99e5395caf9b62]::session::Session>::time::<(), rustc_typeck[65f6cc0eda670a77]::check_crate::{closure#7}>
  88:     0x7f8f1a2e2cdb - rustc_typeck[65f6cc0eda670a77]::check_crate
  89:     0x7f8f1a09f587 - rustc_interface[2808bdc579fb1dcb]::passes::analysis
  90:     0x7f8f1a51c315 - <rustc_query_system[e792b288446fca87]::dep_graph::graph::DepGraph<rustc_middle[8ca1ffa4f0d07531]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[8ca1ffa4f0d07531]::ty::context::TyCtxt, (), core[9a5575405027e362]::result::Result<(), rustc_errors[f2e3be3759aa4428]::ErrorGuaran
teed>>
  91:     0x7f8f1a5c154d - rustc_query_system[e792b288446fca87]::query::plumbing::try_execute_query::<rustc_query_impl[f4d741971085f907]::plumbing::QueryCtxt, rustc_query_system[e792b288446fca87]::query::caches::DefaultCache<(), core[9a5575405027e362]::result::Result<(), rustc_errors[f2e3be3759aa4428]::ErrorGua
ranteed>>>
  92:     0x7f8f1a60892e - rustc_query_system[e792b288446fca87]::query::plumbing::get_query::<rustc_query_impl[f4d741971085f907]::queries::analysis, rustc_query_impl[f4d741971085f907]::plumbing::QueryCtxt>
  93:     0x7f8f1a05ca47 - <rustc_interface[2808bdc579fb1dcb]::passes::QueryContext>::enter::<rustc_driver[9b2cc5dd0ee5154e]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[9a5575405027e362]::result::Result<(), rustc_errors[f2e3be3759aa4428]::ErrorGuaranteed>>
  94:     0x7f8f1a046bbf - <rustc_interface[2808bdc579fb1dcb]::interface::Compiler>::enter::<rustc_driver[9b2cc5dd0ee5154e]::run_compiler::{closure#1}::{closure#2}, core[9a5575405027e362]::result::Result<core[9a5575405027e362]::option::Option<rustc_interface[2808bdc579fb1dcb]::queries::Linker>, rustc_errors[f2e
3be3759aa4428]::ErrorGuaranteed>>
  95:     0x7f8f1a0701cf - rustc_span[e19345dc80a27759]::with_source_map::<core[9a5575405027e362]::result::Result<(), rustc_errors[f2e3be3759aa4428]::ErrorGuaranteed>, rustc_interface[2808bdc579fb1dcb]::interface::create_compiler_and_run<core[9a5575405027e362]::result::Result<(), rustc_errors[f2e3be3759aa4428]:
:ErrorGuaranteed>, rustc_driver[9b2cc5dd0ee5154e]::run_compiler::{closure#1}>::{closure#1}>
  96:     0x7f8f1a047a52 - <scoped_tls[846b7f23ce5bfed4]::ScopedKey<rustc_span[e19345dc80a27759]::SessionGlobals>>::set::<rustc_interface[2808bdc579fb1dcb]::interface::run_compiler<core[9a5575405027e362]::result::Result<(), rustc_errors[f2e3be3759aa4428]::ErrorGuaranteed>, rustc_driver[9b2cc5dd0ee5154e]::run_co
mpiler::{closure#1}>::{closure#0}, core[9a5575405027e362]::result::Result<(), rustc_errors[f2e3be3759aa4428]::ErrorGuaranteed>>
  97:     0x7f8f1a05d0cf - std[a0eb98a96cd1d67b]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[2808bdc579fb1dcb]::util::run_in_thread_pool_with_globals<rustc_interface[2808bdc579fb1dcb]::interface::run_compiler<core[9a5575405027e362]::result::Result<(), rustc_errors[f2e3be3759aa4428]::E
rrorGuaranteed>, rustc_driver[9b2cc5dd0ee5154e]::run_compiler::{closure#1}>::{closure#0}, core[9a5575405027e362]::result::Result<(), rustc_errors[f2e3be3759aa4428]::ErrorGuaranteed>>::{closure#0}, core[9a5575405027e362]::result::Result<(), rustc_errors[f2e3be3759aa4428]::ErrorGuaranteed>>
  98:     0x7f8f1a05d239 - <<std[a0eb98a96cd1d67b]::thread::Builder>::spawn_unchecked_<rustc_interface[2808bdc579fb1dcb]::util::run_in_thread_pool_with_globals<rustc_interface[2808bdc579fb1dcb]::interface::run_compiler<core[9a5575405027e362]::result::Result<(), rustc_errors[f2e3be3759aa4428]::ErrorGuaranteed>, 
rustc_driver[9b2cc5dd0ee5154e]::run_compiler::{closure#1}>::{closure#0}, core[9a5575405027e362]::result::Result<(), rustc_errors[f2e3be3759aa4428]::ErrorGuaranteed>>::{closure#0}, core[9a5575405027e362]::result::Result<(), rustc_errors[f2e3be3759aa4428]::ErrorGuaranteed>>::{closure#1} as core[9a5575405027e362]:
:ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  99:     0x7f8f176e0373 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hed7040088a8f20af
                               at /rustc/5435ed6916a59e8d5acba2149316a841c3905cbd/library/alloc/src/boxed.rs:1951:9
 100:     0x7f8f176e0373 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h74b0534bb454589b
                               at /rustc/5435ed6916a59e8d5acba2149316a841c3905cbd/library/alloc/src/boxed.rs:1951:9
 101:     0x7f8f176e0373 - std::sys::unix::thread::Thread::new::thread_start::hf83752a2adec8b03
                               at /rustc/5435ed6916a59e8d5acba2149316a841c3905cbd/library/std/src/sys/unix/thread.rs:108:17
 102:     0x7f8f175fe609 - start_thread
                               at /build/glibc-sMfBJT/glibc-2.31/nptl/pthread_create.c:477:8
 103:     0x7f8f17521163 - clone
 104:                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.63.0-nightly (5435ed691 2022-06-07) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type cdylib --crate-type rlib -C embed-bitcode=no -C debuginfo=2 -C incremental

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [typeck] type-checking `app_definition_validator::<impl at core10-validation/src/app_definition_validator.rs:54:1: 272:2>::find_exe_path_merges`
#1 [typeck] type-checking `app_definition_validator::<impl at core10-validation/src/app_definition_validator.rs:54:1: 272:2>::find_exe_path_merges::{closure#0}`
#2 [typeck_item_bodies] type-checking all item bodies
#3 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `core10-validation`
Error with stable
error[E0282]: type annotations needed for `std::collections::HashMap<&core10_action_api::Fmid, V>`
   --> core10-validation/src/app_definition_validator.rs:249:44
    |
249 |                     .fold(HashMap::new(), |mut map, (caller, callee)| {
    |                                            ^^^^^^^ consider giving this closure parameter the explicit type `std::collections::HashMap<_, V>`, where the type parameter `V` is specified
    |
    = note: type must be known at this point

error[E0308]: mismatched types
   --> core10-validation/src/lib.rs:313:50
    |
313 |     let errors = AppDefinitionValidator::try_new(app_definition, module_definitions)
    |                                                  ^^^^^^^^^^^^^^ types differ in mutability
    |
    = note: expected mutable reference `&mut AppDefinition`
                       found reference `&AppDefinition`

@cjgillot
Copy link
Contributor

cjgillot commented Sep 5, 2022

Closing as duplicate of closed #97698.

@cjgillot cjgillot closed this as completed Sep 5, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants