Skip to content

Could not compile serde_traitobject #113148

Closed
@Jatin-Nagpal

Description

@Jatin-Nagpal

Code

<code>

Meta

rustc --version --verbose:

rustc 1.68.0 (2c8cc3432 2023-03-06)
binary: rustc
commit-hash: 2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74
commit-date: 2023-03-06
host: x86_64-unknown-linux-gnu
release: 1.68.0
LLVM version: 15.0.6

Command

RUST_BACKTRACE=full RUSTFLAGS=-Ctarget-cpu=native cargo +nightly bench

Error output

Compiling serde_traitobject v0.2.8
error: internal compiler error: compiler/rustc_mir_transform/src/inline.rs:220:17: Closure arguments are not passed as a tuple

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/a97c36dd2e6f711949fc9b790476e93bd9e6d1f4/compiler/rustc_errors/src/lib.rs:1650:9
stack backtrace:
   0:     0x7f7e9d15fb71 - trace
                               at /rustc/a97c36dd2e6f711949fc9b790476e93bd9e6d1f4/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f7e9d15fb71 - trace_unsynchronized<std::sys_common::backtrace::_print_fmt::{closure_env#1}>
                               at /rustc/a97c36dd2e6f711949fc9b790476e93bd9e6d1f4/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f7e9d15fb71 - _print_fmt
                               at /rustc/a97c36dd2e6f711949fc9b790476e93bd9e6d1f4/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f7e9d15fb71 - fmt
                               at /rustc/a97c36dd2e6f711949fc9b790476e93bd9e6d1f4/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f7e9d1c04bf - fmt
                               at /rustc/a97c36dd2e6f711949fc9b790476e93bd9e6d1f4/library/core/src/fmt/rt.rs:138:9
   5:     0x7f7e9d1c04bf - write
                               at /rustc/a97c36dd2e6f711949fc9b790476e93bd9e6d1f4/library/core/src/fmt/mod.rs:1094:21
   6:     0x7f7e9d152d71 - write_fmt<std::sys::unix::stdio::Stderr>
                               at /rustc/a97c36dd2e6f711949fc9b790476e93bd9e6d1f4/library/std/src/io/mod.rs:1713:15
   7:     0x7f7e9d15f985 - _print
                               at /rustc/a97c36dd2e6f711949fc9b790476e93bd9e6d1f4/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7f7e9d15f985 - print
                               at /rustc/a97c36dd2e6f711949fc9b790476e93bd9e6d1f4/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7f7e9d162647 - {closure#1}
  10:     0x7f7e9d162434 - default_hook
                               at /rustc/a97c36dd2e6f711949fc9b790476e93bd9e6d1f4/library/std/src/panicking.rs:288:9
  11:     0x7f7e9bfcc9fb - <rustc_driver_impl[3f359aa20f2c61f0]::install_ice_hook::{closure#0} as core[f9f5fd1b7386ffed]::ops::function::FnOnce<(&core[f9f5fd1b7386ffed]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  12:     0x7f7e9d162d8d - call<(&core::panic::panic_info::PanicInfo), (dyn core::ops::function::Fn<(&core::panic::panic_info::PanicInfo), Output=()> + core::marker::Send + core::marker::Sync), alloc::alloc::Global>
                               at /rustc/a97c36dd2e6f711949fc9b790476e93bd9e6d1f4/library/alloc/src/boxed.rs:1999:9
  13:     0x7f7e9d162d8d - rust_panic_with_hook
                               at /rustc/a97c36dd2e6f711949fc9b790476e93bd9e6d1f4/library/std/src/panicking.rs:709:13
  14:     0x7f7e9c4e30b1 - std[72a9bdb14847565]::panicking::begin_panic::<rustc_errors[ff27f3bf056b22eb]::ExplicitBug>::{closure#0}
  15:     0x7f7e9c4de8c6 - std[72a9bdb14847565]::sys_common::backtrace::__rust_end_short_backtrace::<std[72a9bdb14847565]::panicking::begin_panic<rustc_errors[ff27f3bf056b22eb]::ExplicitBug>::{closure#0}, !>
  16:     0x7f7e9c558e56 - std[72a9bdb14847565]::panicking::begin_panic::<rustc_errors[ff27f3bf056b22eb]::ExplicitBug>
  17:     0x7f7e9c4d8b34 - <rustc_errors[ff27f3bf056b22eb]::HandlerInner>::bug::<alloc[c49a19475105f89d]::string::String>
  18:     0x7f7e9c4d88d6 - <rustc_errors[ff27f3bf056b22eb]::Handler>::bug::<alloc[c49a19475105f89d]::string::String>
  19:     0x7f7e9c567265 - rustc_middle[d11dae94dae5aa4]::util::bug::opt_span_bug_fmt::<rustc_span[75d82fe363844395]::span_encoding::Span>::{closure#0}
  20:     0x7f7e9c563e8a - rustc_middle[d11dae94dae5aa4]::ty::context::tls::with_opt::<rustc_middle[d11dae94dae5aa4]::util::bug::opt_span_bug_fmt<rustc_span[75d82fe363844395]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  21:     0x7f7e9c563e5a - rustc_middle[d11dae94dae5aa4]::ty::context::tls::with_context_opt::<rustc_middle[d11dae94dae5aa4]::ty::context::tls::with_opt<rustc_middle[d11dae94dae5aa4]::util::bug::opt_span_bug_fmt<rustc_span[75d82fe363844395]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  22:     0x7f7e9a26383d - rustc_middle[d11dae94dae5aa4]::util::bug::bug_fmt
  23:     0x7f7e9ad60746 - <rustc_mir_transform[4856baf7e44d39b8]::inline::Inliner>::try_inlining
  24:     0x7f7e9ad583f1 - <rustc_mir_transform[4856baf7e44d39b8]::inline::Inliner>::process_blocks
  25:     0x7f7e9ad57bd8 - <rustc_mir_transform[4856baf7e44d39b8]::inline::Inline as rustc_middle[d11dae94dae5aa4]::mir::MirPass>::run_pass
  26:     0x7f7e9b37845e - rustc_mir_transform[4856baf7e44d39b8]::optimized_mir
  27:     0x7f7e9a0662c8 - rustc_query_impl[84f706b35b6b9e70]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[84f706b35b6b9e70]::query_impl::optimized_mir::dynamic_query::{closure#2}::{closure#0}, rustc_middle[d11dae94dae5aa4]::query::erase::Erased<[u8; 8usize]>>
  28:     0x7f7e9a066291 - <rustc_query_impl[84f706b35b6b9e70]::query_impl::optimized_mir::dynamic_query::{closure#2} as core[f9f5fd1b7386ffed]::ops::function::FnOnce<(rustc_middle[d11dae94dae5aa4]::ty::context::TyCtxt, rustc_span[75d82fe363844395]::def_id::DefId)>>::call_once
  29:     0x7f7e9a023c35 - rustc_query_system[716cab2bfe503dab]::query::plumbing::try_execute_query::<rustc_query_impl[84f706b35b6b9e70]::DynamicConfig<rustc_query_system[716cab2bfe503dab]::query::caches::DefaultCache<rustc_span[75d82fe363844395]::def_id::DefId, rustc_middle[d11dae94dae5aa4]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[84f706b35b6b9e70]::plumbing::QueryCtxt, false>
  30:     0x7f7e9b949574 - rustc_query_impl[84f706b35b6b9e70]::query_impl::optimized_mir::get_query_non_incr::__rust_end_short_backtrace
  31:     0x7f7e9b3210fd - <rustc_metadata[f0361a87505a3bd1]::rmeta::encoder::EncodeContext>::encode_crate_root
  32:     0x7f7e9b2ab3eb - rustc_metadata[f0361a87505a3bd1]::rmeta::encoder::encode_metadata_impl
  33:     0x7f7e9b2a3db1 - rustc_data_structures[1f97a7aa4fc669e3]::sync::join::<rustc_metadata[f0361a87505a3bd1]::rmeta::encoder::encode_metadata::{closure#0}, rustc_metadata[f0361a87505a3bd1]::rmeta::encoder::encode_metadata::{closure#1}, (), ()>
  34:     0x7f7e9b2a39b9 - rustc_metadata[f0361a87505a3bd1]::rmeta::encoder::encode_metadata
  35:     0x7f7e9b2a22cb - rustc_metadata[f0361a87505a3bd1]::fs::encode_and_write_metadata
  36:     0x7f7e9b295830 - rustc_interface[5cebeb4b37f8e7df]::passes::start_codegen
  37:     0x7f7e9b29100d - <rustc_middle[d11dae94dae5aa4]::ty::context::GlobalCtxt>::enter::<<rustc_interface[5cebeb4b37f8e7df]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[f9f5fd1b7386ffed]::result::Result<alloc[c49a19475105f89d]::boxed::Box<dyn core[f9f5fd1b7386ffed]::any::Any>, rustc_span[75d82fe363844395]::ErrorGuaranteed>>
  38:     0x7f7e9b28f75d - <rustc_interface[5cebeb4b37f8e7df]::queries::Queries>::ongoing_codegen
  39:     0x7f7e9b28ed33 - <rustc_interface[5cebeb4b37f8e7df]::interface::Compiler>::enter::<rustc_driver_impl[3f359aa20f2c61f0]::run_compiler::{closure#1}::{closure#2}, core[f9f5fd1b7386ffed]::result::Result<core[f9f5fd1b7386ffed]::option::Option<rustc_interface[5cebeb4b37f8e7df]::queries::Linker>, rustc_span[75d82fe363844395]::ErrorGuaranteed>>
  40:     0x7f7e9b28c310 - std[72a9bdb14847565]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[5cebeb4b37f8e7df]::util::run_in_thread_pool_with_globals<rustc_interface[5cebeb4b37f8e7df]::interface::run_compiler<core[f9f5fd1b7386ffed]::result::Result<(), rustc_span[75d82fe363844395]::ErrorGuaranteed>, rustc_driver_impl[3f359aa20f2c61f0]::run_compiler::{closure#1}>::{closure#0}, core[f9f5fd1b7386ffed]::result::Result<(), rustc_span[75d82fe363844395]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f9f5fd1b7386ffed]::result::Result<(), rustc_span[75d82fe363844395]::ErrorGuaranteed>>
  41:     0x7f7e9b28bab5 - <<std[72a9bdb14847565]::thread::Builder>::spawn_unchecked_<rustc_interface[5cebeb4b37f8e7df]::util::run_in_thread_pool_with_globals<rustc_interface[5cebeb4b37f8e7df]::interface::run_compiler<core[f9f5fd1b7386ffed]::result::Result<(), rustc_span[75d82fe363844395]::ErrorGuaranteed>, rustc_driver_impl[3f359aa20f2c61f0]::run_compiler::{closure#1}>::{closure#0}, core[f9f5fd1b7386ffed]::result::Result<(), rustc_span[75d82fe363844395]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f9f5fd1b7386ffed]::result::Result<(), rustc_span[75d82fe363844395]::ErrorGuaranteed>>::{closure#1} as core[f9f5fd1b7386ffed]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  42:     0x7f7e9d16d2b5 - call_once<(), dyn core::ops::function::FnOnce<(), Output=()>, alloc::alloc::Global>
                               at /rustc/a97c36dd2e6f711949fc9b790476e93bd9e6d1f4/library/alloc/src/boxed.rs:1985:9
  43:     0x7f7e9d16d2b5 - call_once<(), alloc::boxed::Box<dyn core::ops::function::FnOnce<(), Output=()>, alloc::alloc::Global>, alloc::alloc::Global>
                               at /rustc/a97c36dd2e6f711949fc9b790476e93bd9e6d1f4/library/alloc/src/boxed.rs:1985:9
  44:     0x7f7e9d16d2b5 - thread_start
                               at /rustc/a97c36dd2e6f711949fc9b790476e93bd9e6d1f4/library/std/src/sys/unix/thread.rs:108:17
  45:     0x7f7e98a94b43 - start_thread
                               at ./nptl/pthread_create.c:442:8
  46:     0x7f7e98b26a00 - clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  47:                0x0 - <unknown>

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 (a97c36dd2 2023-06-07) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C target-cpu=native

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

query stack during panic:
#0 [optimized_mir] optimizing MIR for `convenience::<impl at /home/jatin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_traitobject-0.2.8/src/convenience.rs:159:1: 159:51>::call_mut`
end of query stack
error: could not compile `serde_traitobject` (lib)
Backtrace

<backtrace>

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions