Skip to content

async drop cause ICE with broken MIR in Item #141327

New issue

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

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

Already on GitHub? Sign in to your account

Closed
Sherlock-Holo opened this issue May 21, 2025 · 2 comments
Closed

async drop cause ICE with broken MIR in Item #141327

Sherlock-Holo opened this issue May 21, 2025 · 2 comments
Labels
C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example F-async_drop `#![feature(async_drop)]` 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

@Sherlock-Holo
Copy link

Code

ICE on my private repo codes, I still not find a minimum reproducibility codes

Meta

rustc --version --verbose:

rustc 1.89.0-nightly (bc8215286 2025-05-20)
binary: rustc
commit-hash: bc821528634632b4ff8dee5ac1ea4ad90d1b3eb5
commit-date: 2025-05-20
host: x86_64-unknown-linux-gnu
release: 1.89.0-nightly
LLVM version: 20.1.5

Error output

   Compiling wiresquirrel_core v0.1.0 (/home/sherlock/git/wiresquirrel/core)
warning: the feature `async_drop` is incomplete and may not be safe to use and/or cause compiler crashes
 --> core/src/lib.rs:7:12
  |
7 | #![feature(async_drop)]
  |            ^^^^^^^^^^
  |
  = note: see issue #126482 <https://github.com/rust-lang/rust/issues/126482> for more information
  = note: `#[warn(incomplete_features)]` on by default


thread 'rustc' panicked at compiler/rustc_mir_transform/src/validate.rs:80:25:
broken MIR in Item(DefId(0:906 ~ wiresquirrel_core[a875]::cli::linux::run::{closure#0}::{closure#6})) (after phase change to runtime-optimized) at bb17[0]:
encountered `Assign((_0, const false))` with incompatible types:
left-hand side has type: std::task::Poll<std::option::Option<bytes::Bytes>>
right-hand side has type: bool
stack backtrace:
   0:     0x7d0ea0d61a73 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h24cce33e116011c6
   1:     0x7d0ea1405837 - core::fmt::write::hffd63865e7938eb0
   2:     0x7d0ea2457051 - std::io::Write::write_fmt::he3e365eda84ffd63
   3:     0x7d0ea0d618d2 - std::sys::backtrace::BacktraceLock::print::hea5a4a3d2933a741
   4:     0x7d0ea0d654ca - std::panicking::default_hook::{{closure}}::h3e9f25e2500cfcde
   5:     0x7d0ea0d6504f - std::panicking::default_hook::h24e4f38efb6a748f
   6:     0x7d0e9fd90c43 - std[3914346c225bd5f0]::panicking::update_hook::<alloc[9ed1d44d7c4708bd]::boxed::Box<rustc_driver_impl[d8ce8b2ff3a6d9d7]::install_ice_hook::{closure#1}>>::{closure#0}
   7:     0x7d0ea0d65d43 - std::panicking::rust_panic_with_hook::h2c223ad0988ff703
   8:     0x7d0ea0d65a3a - std::panicking::begin_panic_handler::{{closure}}::h9b8934eb82bb206d
   9:     0x7d0ea0d61f39 - std::sys::backtrace::__rust_end_short_backtrace::hf5bd8833a69d3b26
  10:     0x7d0ea0d656fd - __rustc[7b2f7a1b71ff6e74]::rust_begin_unwind
  11:     0x7d0e9d687540 - core::panicking::panic_fmt::hb28ab7e8d517e5a8
  12:     0x7d0e9ecacd22 - <rustc_mir_transform[25414f5aada25492]::validate::CfgChecker>::fail::<alloc[9ed1d44d7c4708bd]::string::String>
  13:     0x7d0ea24c9116 - <rustc_mir_transform[25414f5aada25492]::validate::Validator as rustc_mir_transform[25414f5aada25492]::pass_manager::MirPass>::run_pass
  14:     0x7d0ea1403ace - rustc_mir_transform[25414f5aada25492]::pass_manager::run_passes_inner
  15:     0x7d0ea1ec3143 - rustc_mir_transform[25414f5aada25492]::run_optimization_passes
  16:     0x7d0ea1ec0a3b - rustc_mir_transform[25414f5aada25492]::optimized_mir
  17:     0x7d0ea1ec05dd - rustc_query_impl[317f8e41882152a9]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[317f8e41882152a9]::query_impl::optimized_mir::dynamic_query::{closure#2}::{closure#0}, rustc_middle[efd06070ee00b53c]::query::erase::Erased<[u8; 8usize]>>
  18:     0x7d0ea1721fff - rustc_query_system[dde7b6bcb3c3d2eb]::query::plumbing::try_execute_query::<rustc_query_impl[317f8e41882152a9]::DynamicConfig<rustc_query_system[dde7b6bcb3c3d2eb]::query::caches::DefIdCache<rustc_middle[efd06070ee00b53c]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[317f8e41882152a9]::plumbing::QueryCtxt, true>
  19:     0x7d0ea171f350 - rustc_query_impl[317f8e41882152a9]::query_impl::optimized_mir::get_query_incr::__rust_end_short_backtrace
  20:     0x7d0ea0442cb5 - <rustc_middle[efd06070ee00b53c]::ty::context::TyCtxt>::coroutine_layout
  21:     0x7d0ea1c0564d - rustc_ty_utils[6127239590620beb]::layout::layout_of_uncached
  22:     0x7d0ea1bf7fd1 - rustc_ty_utils[6127239590620beb]::layout::layout_of
  23:     0x7d0ea1bf7f3a - rustc_query_impl[317f8e41882152a9]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[317f8e41882152a9]::query_impl::layout_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[efd06070ee00b53c]::query::erase::Erased<[u8; 16usize]>>
  24:     0x7d0ea1712c80 - rustc_query_system[dde7b6bcb3c3d2eb]::query::plumbing::try_execute_query::<rustc_query_impl[317f8e41882152a9]::DynamicConfig<rustc_query_system[dde7b6bcb3c3d2eb]::query::caches::DefaultCache<rustc_middle[efd06070ee00b53c]::ty::PseudoCanonicalInput<rustc_middle[efd06070ee00b53c]::ty::Ty>, rustc_middle[efd06070ee00b53c]::query::erase::Erased<[u8; 16usize]>>, false, true, false>, rustc_query_impl[317f8e41882152a9]::plumbing::QueryCtxt, true>
  25:     0x7d0ea1711925 - rustc_query_impl[317f8e41882152a9]::query_impl::layout_of::get_query_incr::__rust_end_short_backtrace
  26:     0x7d0ea16c3426 - rustc_interface[8b5ed5cc71808bfb]::passes::run_required_analyses
  27:     0x7d0ea22f3c9e - rustc_interface[8b5ed5cc71808bfb]::passes::analysis
  28:     0x7d0ea22f3c75 - rustc_query_impl[317f8e41882152a9]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[317f8e41882152a9]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[efd06070ee00b53c]::query::erase::Erased<[u8; 0usize]>>
  29:     0x7d0ea265cb04 - rustc_query_system[dde7b6bcb3c3d2eb]::query::plumbing::try_execute_query::<rustc_query_impl[317f8e41882152a9]::DynamicConfig<rustc_query_system[dde7b6bcb3c3d2eb]::query::caches::SingleCache<rustc_middle[efd06070ee00b53c]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[317f8e41882152a9]::plumbing::QueryCtxt, true>
  30:     0x7d0ea265c542 - rustc_query_impl[317f8e41882152a9]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
  31:     0x7d0ea2533687 - rustc_interface[8b5ed5cc71808bfb]::passes::create_and_enter_global_ctxt::<core[818b365bbc1bf65]::option::Option<rustc_interface[8b5ed5cc71808bfb]::queries::Linker>, rustc_driver_impl[d8ce8b2ff3a6d9d7]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
  32:     0x7d0ea2499666 - rustc_interface[8b5ed5cc71808bfb]::interface::run_compiler::<(), rustc_driver_impl[d8ce8b2ff3a6d9d7]::run_compiler::{closure#0}>::{closure#1}
  33:     0x7d0ea2451786 - std[3914346c225bd5f0]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[8b5ed5cc71808bfb]::util::run_in_thread_with_globals<rustc_interface[8b5ed5cc71808bfb]::util::run_in_thread_pool_with_globals<rustc_interface[8b5ed5cc71808bfb]::interface::run_compiler<(), rustc_driver_impl[d8ce8b2ff3a6d9d7]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  34:     0x7d0ea245142b - <<std[3914346c225bd5f0]::thread::Builder>::spawn_unchecked_<rustc_interface[8b5ed5cc71808bfb]::util::run_in_thread_with_globals<rustc_interface[8b5ed5cc71808bfb]::util::run_in_thread_pool_with_globals<rustc_interface[8b5ed5cc71808bfb]::interface::run_compiler<(), rustc_driver_impl[d8ce8b2ff3a6d9d7]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[818b365bbc1bf65]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  35:     0x7d0ea2452f3d - std::sys::pal::unix::thread::Thread::new::thread_start::h00f1215b5b464122
  36:     0x7d0e9c2a57eb - <unknown>
  37:     0x7d0e9c32918c - <unknown>
  38:                0x0 - <unknown>

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: please make sure that you have updated to the latest nightly

note: please attach the file at `/home/sherlock/git/wiresquirrel/rustc-ice-2025-05-21T08_39_37-2448807.txt` to your bug report

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C linker=clang -C incremental=[REDACTED] -C link-arg=-fuse-ld=/usr/bin/mold -C target_cpu=x86-64-v3

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

query stack during panic:
#0 [optimized_mir] optimizing MIR for `cli::linux::run::{closure#0}::{closure#6}`
#1 [layout_of] computing layout of `{async gen block@core/src/cli/linux/mod.rs:217:17: 217:31}`
... and 1 other queries... use `env RUST_BACKTRACE=1` to see the full query stack
warning: `wiresquirrel_core` (lib) generated 1 warning
error: could not compile `wiresquirrel_core` (lib); 1 warning emitted

Caused by:
  process didn't exit successfully: `/home/sherlock/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc --crate-name wiresquirrel_core --edition=2024 core/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=125 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="cli"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("cli", "ffi"))' -C metadata=3368e93c29cdafe8 -C extra-filename=-be9a41139815fb86 --out-dir /home/sherlock/git/wiresquirrel/target/debug/deps -C linker=clang -C incremental=/home/sherlock/git/wiresquirrel/target/debug/incremental -L dependency=/home/sherlock/git/wiresquirrel/target/debug/deps --extern ahash=/home/sherlock/git/wiresquirrel/target/debug/deps/libahash-e75fb63958a8304a.rmeta --extern arc_swap=/home/sherlock/git/wiresquirrel/target/debug/deps/libarc_swap-cd9c304c6590186a.rmeta --extern aya=/home/sherlock/git/wiresquirrel/target/debug/deps/libaya-c5e99e1eb9f5e12e.rmeta --extern aya_log=/home/sherlock/git/wiresquirrel/target/debug/deps/libaya_log-3cccd7ed4d7c522d.rmeta --extern backon=/home/sherlock/git/wiresquirrel/target/debug/deps/libbackon-7df4410976cf7aaa.rmeta --extern byte_unit=/home/sherlock/git/wiresquirrel/target/debug/deps/libbyte_unit-0e24c27fbeee2016.rmeta --extern bytes=/home/sherlock/git/wiresquirrel/target/debug/deps/libbytes-06d9ff1734640dd4.rmeta --extern cidr=/home/sherlock/git/wiresquirrel/target/debug/deps/libcidr-d25f8e0374efa068.rmeta --extern clap=/home/sherlock/git/wiresquirrel/target/debug/deps/libclap-9cb6582baf29c30b.rmeta --extern ed25519_dalek=/home/sherlock/git/wiresquirrel/target/debug/deps/libed25519_dalek-582a8d097cee3a01.rmeta --extern educe=/home/sherlock/git/wiresquirrel/target/debug/deps/libeduce-4f07322e2f6a1741.so --extern flume=/home/sherlock/git/wiresquirrel/target/debug/deps/libflume-d5c2193575d6dcfe.rmeta --extern formatx=/home/sherlock/git/wiresquirrel/target/debug/deps/libformatx-fb40df9cd71850f1.rmeta --extern futures_util=/home/sherlock/git/wiresquirrel/target/debug/deps/libfutures_util-15171d698b60fe03.rmeta --extern hex=/home/sherlock/git/wiresquirrel/target/debug/deps/libhex-c6e1a4ea140afb0d.rmeta --extern hickory_resolver=/home/sherlock/git/wiresquirrel/target/debug/deps/libhickory_resolver-7b86e69be25410fc.rmeta --extern http=/home/sherlock/git/wiresquirrel/target/debug/deps/libhttp-f290df853e63dda7.rmeta --extern http_body_util=/home/sherlock/git/wiresquirrel/target/debug/deps/libhttp_body_util-1303bdc5fc93b5e1.rmeta --extern humantime=/home/sherlock/git/wiresquirrel/target/debug/deps/libhumantime-c1d01d741eec6d06.rmeta --extern hyper=/home/sherlock/git/wiresquirrel/target/debug/deps/libhyper-7fafe3adbbc23d66.rmeta --extern hyper_util=/home/sherlock/git/wiresquirrel/target/debug/deps/libhyper_util-6e888e615aff0262.rmeta --extern itertools=/home/sherlock/git/wiresquirrel/target/debug/deps/libitertools-a613a7b536802c2d.rmeta --extern libc=/home/sherlock/git/wiresquirrel/target/debug/deps/liblibc-16451e20c25b41c0.rmeta --extern pnet_packet=/home/sherlock/git/wiresquirrel/target/debug/deps/libpnet_packet-5c2b21ac0edf13b1.rmeta --extern prost=/home/sherlock/git/wiresquirrel/target/debug/deps/libprost-6250a8faa8b876f6.rmeta --extern quinn=/home/sherlock/git/wiresquirrel/target/debug/deps/libquinn-c768ee828d5739a7.rmeta --extern rand=/home/sherlock/git/wiresquirrel/target/debug/deps/librand-51fc021b6a288ea0.rmeta --extern rtnetlink=/home/sherlock/git/wiresquirrel/target/debug/deps/librtnetlink-f6561df009446a53.rmeta --extern rustix=/home/sherlock/git/wiresquirrel/target/debug/deps/librustix-adeb340687cde12b.rmeta --extern rustls=/home/sherlock/git/wiresquirrel/target/debug/deps/librustls-b76fdf57a4918b68.rmeta --extern rustls_native_certs=/home/sherlock/git/wiresquirrel/target/debug/deps/librustls_native_certs-692583f11a285943.rmeta --extern serde=/home/sherlock/git/wiresquirrel/target/debug/deps/libserde-a7145642aea5a421.rmeta --extern serde_json=/home/sherlock/git/wiresquirrel/target/debug/deps/libserde_json-eb26c5de2a1f11a0.rmeta --extern serde_yaml=/home/sherlock/git/wiresquirrel/target/debug/deps/libserde_yaml-583b8beaa322acf1.rmeta --extern socket2=/home/sherlock/git/wiresquirrel/target/debug/deps/libsocket2-ffc95a2eb99bac7d.rmeta --extern tabwriter=/home/sherlock/git/wiresquirrel/target/debug/deps/libtabwriter-eb3ca213606e9b14.rmeta --extern thiserror=/home/sherlock/git/wiresquirrel/target/debug/deps/libthiserror-583bb08608240437.rmeta --extern tokio=/home/sherlock/git/wiresquirrel/target/debug/deps/libtokio-d6c16aecbc009c39.rmeta --extern tokio_util=/home/sherlock/git/wiresquirrel/target/debug/deps/libtokio_util-72a8e05e58081d4c.rmeta --extern tracing=/home/sherlock/git/wiresquirrel/target/debug/deps/libtracing-3a8ab6a8343d9966.rmeta --extern tracing_appender=/home/sherlock/git/wiresquirrel/target/debug/deps/libtracing_appender-803c2e943a82248a.rmeta --extern tracing_log=/home/sherlock/git/wiresquirrel/target/debug/deps/libtracing_log-15f3bb65002a01e5.rmeta --extern tracing_subscriber=/home/sherlock/git/wiresquirrel/target/debug/deps/libtracing_subscriber-2a119ab0e3b63a88.rmeta --extern trait_variant=/home/sherlock/git/wiresquirrel/target/debug/deps/libtrait_variant-016742f55a28c5b5.so --extern typed_builder=/home/sherlock/git/wiresquirrel/target/debug/deps/libtyped_builder-14886784b6612788.rmeta -C link-arg=-fuse-ld=/usr/bin/mold -C target_cpu=x86-64-v3 -L native=/home/sherlock/git/wiresquirrel/target/debug/build/aws-lc-sys-4c256d4dc61c1d3d/out` (exit status: 101)
Backtrace

   Compiling wiresquirrel_core v0.1.0 (/home/sherlock/git/wiresquirrel/core)
warning: the feature `async_drop` is incomplete and may not be safe to use and/or cause compiler crashes
 --> core/src/lib.rs:7:12
  |
7 | #![feature(async_drop)]
  |            ^^^^^^^^^^
  |
  = note: see issue #126482 <https://github.com/rust-lang/rust/issues/126482> for more information
  = note: `#[warn(incomplete_features)]` on by default


thread 'rustc' panicked at compiler/rustc_mir_transform/src/validate.rs:80:25:
broken MIR in Item(DefId(0:906 ~ wiresquirrel_core[a875]::cli::linux::run::{closure#0}::{closure#6})) (after phase change to runtime-optimized) at bb17[0]:
encountered `Assign((_0, const false))` with incompatible types:
left-hand side has type: std::task::Poll<std::option::Option<bytes::Bytes>>
right-hand side has type: bool
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: <rustc_mir_transform::validate::CfgChecker>::fail::<alloc::string::String>
   3: <rustc_mir_transform::validate::Validator as rustc_mir_transform::pass_manager::MirPass>::run_pass
   4: rustc_mir_transform::pass_manager::run_passes_inner
   5: rustc_mir_transform::run_optimization_passes
   6: rustc_mir_transform::optimized_mir
      [... omitted 1 frame ...]
   7: <rustc_middle::ty::context::TyCtxt>::coroutine_layout
   8: rustc_ty_utils::layout::layout_of_uncached
   9: rustc_ty_utils::layout::layout_of
      [... omitted 1 frame ...]
  10: rustc_interface::passes::run_required_analyses
  11: rustc_interface::passes::analysis
      [... omitted 1 frame ...]
  12: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
  13: rustc_interface::interface::run_compiler::<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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: please make sure that you have updated to the latest nightly

note: please attach the file at `/home/sherlock/git/wiresquirrel/rustc-ice-2025-05-21T08_40_06-2449208.txt` to your bug report

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C linker=clang -C incremental=[REDACTED] -C link-arg=-fuse-ld=/usr/bin/mold -C target_cpu=x86-64-v3

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

query stack during panic:
#0 [optimized_mir] optimizing MIR for `cli::linux::run::{closure#0}::{closure#6}`
#1 [layout_of] computing layout of `{async gen block@core/src/cli/linux/mod.rs:217:17: 217:31}`
#2 [analysis] running analysis passes on this crate
end of query stack
warning: `wiresquirrel_core` (lib) generated 1 warning
error: could not compile `wiresquirrel_core` (lib); 1 warning emitted

Caused by:
  process didn't exit successfully: `/home/sherlock/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc --crate-name wiresquirrel_core --edition=2024 core/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=125 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="cli"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("cli", "ffi"))' -C metadata=3368e93c29cdafe8 -C extra-filename=-be9a41139815fb86 --out-dir /home/sherlock/git/wiresquirrel/target/debug/deps -C linker=clang -C incremental=/home/sherlock/git/wiresquirrel/target/debug/incremental -L dependency=/home/sherlock/git/wiresquirrel/target/debug/deps --extern ahash=/home/sherlock/git/wiresquirrel/target/debug/deps/libahash-e75fb63958a8304a.rmeta --extern arc_swap=/home/sherlock/git/wiresquirrel/target/debug/deps/libarc_swap-cd9c304c6590186a.rmeta --extern aya=/home/sherlock/git/wiresquirrel/target/debug/deps/libaya-c5e99e1eb9f5e12e.rmeta --extern aya_log=/home/sherlock/git/wiresquirrel/target/debug/deps/libaya_log-3cccd7ed4d7c522d.rmeta --extern backon=/home/sherlock/git/wiresquirrel/target/debug/deps/libbackon-7df4410976cf7aaa.rmeta --extern byte_unit=/home/sherlock/git/wiresquirrel/target/debug/deps/libbyte_unit-0e24c27fbeee2016.rmeta --extern bytes=/home/sherlock/git/wiresquirrel/target/debug/deps/libbytes-06d9ff1734640dd4.rmeta --extern cidr=/home/sherlock/git/wiresquirrel/target/debug/deps/libcidr-d25f8e0374efa068.rmeta --extern clap=/home/sherlock/git/wiresquirrel/target/debug/deps/libclap-9cb6582baf29c30b.rmeta --extern ed25519_dalek=/home/sherlock/git/wiresquirrel/target/debug/deps/libed25519_dalek-582a8d097cee3a01.rmeta --extern educe=/home/sherlock/git/wiresquirrel/target/debug/deps/libeduce-4f07322e2f6a1741.so --extern flume=/home/sherlock/git/wiresquirrel/target/debug/deps/libflume-d5c2193575d6dcfe.rmeta --extern formatx=/home/sherlock/git/wiresquirrel/target/debug/deps/libformatx-fb40df9cd71850f1.rmeta --extern futures_util=/home/sherlock/git/wiresquirrel/target/debug/deps/libfutures_util-15171d698b60fe03.rmeta --extern hex=/home/sherlock/git/wiresquirrel/target/debug/deps/libhex-c6e1a4ea140afb0d.rmeta --extern hickory_resolver=/home/sherlock/git/wiresquirrel/target/debug/deps/libhickory_resolver-7b86e69be25410fc.rmeta --extern http=/home/sherlock/git/wiresquirrel/target/debug/deps/libhttp-f290df853e63dda7.rmeta --extern http_body_util=/home/sherlock/git/wiresquirrel/target/debug/deps/libhttp_body_util-1303bdc5fc93b5e1.rmeta --extern humantime=/home/sherlock/git/wiresquirrel/target/debug/deps/libhumantime-c1d01d741eec6d06.rmeta --extern hyper=/home/sherlock/git/wiresquirrel/target/debug/deps/libhyper-7fafe3adbbc23d66.rmeta --extern hyper_util=/home/sherlock/git/wiresquirrel/target/debug/deps/libhyper_util-6e888e615aff0262.rmeta --extern itertools=/home/sherlock/git/wiresquirrel/target/debug/deps/libitertools-a613a7b536802c2d.rmeta --extern libc=/home/sherlock/git/wiresquirrel/target/debug/deps/liblibc-16451e20c25b41c0.rmeta --extern pnet_packet=/home/sherlock/git/wiresquirrel/target/debug/deps/libpnet_packet-5c2b21ac0edf13b1.rmeta --extern prost=/home/sherlock/git/wiresquirrel/target/debug/deps/libprost-6250a8faa8b876f6.rmeta --extern quinn=/home/sherlock/git/wiresquirrel/target/debug/deps/libquinn-c768ee828d5739a7.rmeta --extern rand=/home/sherlock/git/wiresquirrel/target/debug/deps/librand-51fc021b6a288ea0.rmeta --extern rtnetlink=/home/sherlock/git/wiresquirrel/target/debug/deps/librtnetlink-f6561df009446a53.rmeta --extern rustix=/home/sherlock/git/wiresquirrel/target/debug/deps/librustix-adeb340687cde12b.rmeta --extern rustls=/home/sherlock/git/wiresquirrel/target/debug/deps/librustls-b76fdf57a4918b68.rmeta --extern rustls_native_certs=/home/sherlock/git/wiresquirrel/target/debug/deps/librustls_native_certs-692583f11a285943.rmeta --extern serde=/home/sherlock/git/wiresquirrel/target/debug/deps/libserde-a7145642aea5a421.rmeta --extern serde_json=/home/sherlock/git/wiresquirrel/target/debug/deps/libserde_json-eb26c5de2a1f11a0.rmeta --extern serde_yaml=/home/sherlock/git/wiresquirrel/target/debug/deps/libserde_yaml-583b8beaa322acf1.rmeta --extern socket2=/home/sherlock/git/wiresquirrel/target/debug/deps/libsocket2-ffc95a2eb99bac7d.rmeta --extern tabwriter=/home/sherlock/git/wiresquirrel/target/debug/deps/libtabwriter-eb3ca213606e9b14.rmeta --extern thiserror=/home/sherlock/git/wiresquirrel/target/debug/deps/libthiserror-583bb08608240437.rmeta --extern tokio=/home/sherlock/git/wiresquirrel/target/debug/deps/libtokio-d6c16aecbc009c39.rmeta --extern tokio_util=/home/sherlock/git/wiresquirrel/target/debug/deps/libtokio_util-72a8e05e58081d4c.rmeta --extern tracing=/home/sherlock/git/wiresquirrel/target/debug/deps/libtracing-3a8ab6a8343d9966.rmeta --extern tracing_appender=/home/sherlock/git/wiresquirrel/target/debug/deps/libtracing_appender-803c2e943a82248a.rmeta --extern tracing_log=/home/sherlock/git/wiresquirrel/target/debug/deps/libtracing_log-15f3bb65002a01e5.rmeta --extern tracing_subscriber=/home/sherlock/git/wiresquirrel/target/debug/deps/libtracing_subscriber-2a119ab0e3b63a88.rmeta --extern trait_variant=/home/sherlock/git/wiresquirrel/target/debug/deps/libtrait_variant-016742f55a28c5b5.so --extern typed_builder=/home/sherlock/git/wiresquirrel/target/debug/deps/libtyped_builder-14886784b6612788.rmeta -C link-arg=-fuse-ld=/usr/bin/mold -C target_cpu=x86-64-v3 -L native=/home/sherlock/git/wiresquirrel/target/debug/build/aws-lc-sys-4c256d4dc61c1d3d/out` (exit status: 101)

@Sherlock-Holo Sherlock-Holo added 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. C-bug Category: This is a bug. labels May 21, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label May 21, 2025
@Sherlock-Holo
Copy link
Author

I use async gen block

async gen move {
    loop {
        yield quic_peer_manager.next_broadcast().await;
      }
 }
.into_stream()

and convert it to a futures::Stream

if I delete the yield quic_peer_manager.next_broadcast().await; which the next_broadcast return Bytes the cargo clippy and build will success

however cargo report

warning: found async drop types in dependency `wiresquirrel_core`, but async_drop feature is disabled for `wiresquirrel`

so I add the #![feature(async_drop)] to the wiresquirrel workspace crate, cargo clippy still success, but cargo build ICE with another problem

Backtrace

warning: the feature `async_drop` is incomplete and may not be safe to use and/or cause compiler crashes
 --> core/src/lib.rs:7:12
  |
7 | #![feature(async_drop)]
  |            ^^^^^^^^^^
  |
  = note: see issue #126482 <https://github.com/rust-lang/rust/issues/126482> for more information
  = note: `#[warn(incomplete_features)]` on by default

warning: unused variable: `quic_peer_manager`
   --> core/src/cli/linux/mod.rs:215:17
    |
215 |             let quic_peer_manager = quic_peer_manager.clone();
    |                 ^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_quic_peer_manager`
    |
    = note: `#[warn(unused_variables)]` on by default

warning: method `into_async_iter` is never used
   --> core/src/utils.rs:294:12
    |
293 |     pub trait ToAsyncIter {
    |               ----------- method in this trait
294 |         fn into_async_iter(self) -> StreamAsyncIterAdapter<Self>
    |            ^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

warning: `wiresquirrel_core` (lib) generated 3 warnings
   Compiling wiresquirrel v0.1.0 (/home/sherlock/git/wiresquirrel/cli)
warning: the feature `async_drop` is incomplete and may not be safe to use and/or cause compiler crashes
 --> cli/src/main.rs:1:12
  |
1 | #![feature(async_drop)]
  |            ^^^^^^^^^^
  |
  = note: see issue #126482 <https://github.com/rust-lang/rust/issues/126482> for more information
  = note: `#[warn(incomplete_features)]` on by default


thread 'rustc' panicked at compiler/rustc_mir_transform/src/validate.rs:80:25:
broken MIR in FutureDropPollShim(DefId(2:15347 ~ core[0818]::future::async_drop::async_drop_in_place::{closure#0}), Coroutine(DefId(2:15347 ~ core[0818]::future::async_drop::async_drop_in_place::{closure#0}), [Coroutine(DefId(20:1142 ~ wiresquirrel_core[a875]::quic::peer_manage::{impl#2}::connect_until_success::{closure#0}::{closure#0}::{closure#0}), [wiresquirrel_core::resolve::Resolver, i32, std::future::ResumeTy, (), (wiresquirrel_core::quic::peer_manage::PeerManager<wiresquirrel_core::resolve::Resolver>, std::result::Result<(), wiresquirrel_core::quic::Error>), CoroutineWitness(DefId(20:1142 ~ wiresquirrel_core[a875]::quic::peer_manage::{impl#2}::connect_until_success::{closure#0}::{closure#0}::{closure#0}), [wiresquirrel_core::resolve::Resolver]), (wiresquirrel_core::quic::peer_manage::PeerManager<wiresquirrel_core::resolve::Resolver>, &'{erased} &'{erased} wiresquirrel_core::quic::PublicKey)]), (), std::future::ResumeTy, (), (), CoroutineWitness(DefId(2:15347 ~ core[0818]::future::async_drop::async_drop_in_place::{closure#0}), [Coroutine(DefId(20:1142 ~ wiresquirrel_core[a875]::quic::peer_manage::{impl#2}::connect_until_success::{closure#0}::{closure#0}::{closure#0}), [wiresquirrel_core::resolve::Resolver, i32, std::future::ResumeTy, (), (wiresquirrel_core::quic::peer_manage::PeerManager<wiresquirrel_core::resolve::Resolver>, std::result::Result<(), wiresquirrel_core::quic::Error>), CoroutineWitness(DefId(20:1142 ~ wiresquirrel_core[a875]::quic::peer_manage::{impl#2}::connect_until_success::{closure#0}::{closure#0}::{closure#0}), [wiresquirrel_core::resolve::Resolver]), (wiresquirrel_core::quic::peer_manage::PeerManager<wiresquirrel_core::resolve::Resolver>, &'{erased} &'{erased} wiresquirrel_core::quic::PublicKey)])]), (*mut Coroutine(DefId(20:1142 ~ wiresquirrel_core[a875]::quic::peer_manage::{impl#2}::connect_until_success::{closure#0}::{closure#0}::{closure#0}), [wiresquirrel_core::resolve::Resolver, i32, std::future::ResumeTy, (), (wiresquirrel_core::quic::peer_manage::PeerManager<wiresquirrel_core::resolve::Resolver>, std::result::Result<(), wiresquirrel_core::quic::Error>), CoroutineWitness(DefId(20:1142 ~ wiresquirrel_core[a875]::quic::peer_manage::{impl#2}::connect_until_success::{closure#0}::{closure#0}::{closure#0}), [wiresquirrel_core::resolve::Resolver]), (wiresquirrel_core::quic::peer_manage::PeerManager<wiresquirrel_core::resolve::Resolver>, &'{erased} &'{erased} wiresquirrel_core::quic::PublicKey)]),)]), Coroutine(DefId(20:1142 ~ wiresquirrel_core[a875]::quic::peer_manage::{impl#2}::connect_until_success::{closure#0}::{closure#0}::{closure#0}), [wiresquirrel_core::resolve::Resolver, i32, std::future::ResumeTy, (), (wiresquirrel_core::quic::peer_manage::PeerManager<wiresquirrel_core::resolve::Resolver>, std::result::Result<(), wiresquirrel_core::quic::Error>), CoroutineWitness(DefId(20:1142 ~ wiresquirrel_core[a875]::quic::peer_manage::{impl#2}::connect_until_success::{closure#0}::{closure#0}::{closure#0}), [wiresquirrel_core::resolve::Resolver]), (wiresquirrel_core::quic::peer_manage::PeerManager<wiresquirrel_core::resolve::Resolver>, &'{erased} &'{erased} wiresquirrel_core::quic::PublicKey)])) (after phase change to runtime-optimized) at bb1[0]:
encountered `Assign((_29, deref_copy _45))` with incompatible types:
left-hand side has type: &mut {async closure body@wiresquirrel_core::quic::peer_manage::PeerManager<wiresquirrel_core::resolve::Resolver>::connect_until_success::{closure#0}::{closure#0}::{closure#0}<wiresquirrel_core::resolve::Resolver>}
right-hand side has type: &mut {async closure body@wiresquirrel_core::quic::peer_manage::PeerManager<wiresquirrel_core::resolve::Resolver>::connect_until_success::{closure#0}::{closure#0}::{closure#0}<wiresquirrel_core::resolve::Resolver>}
stack backtrace:
   0:     0x7500da761a73 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h24cce33e116011c6
   1:     0x7500dae05837 - core::fmt::write::hffd63865e7938eb0
   2:     0x7500dbe57051 - std::io::Write::write_fmt::he3e365eda84ffd63
   3:     0x7500da7618d2 - std::sys::backtrace::BacktraceLock::print::hea5a4a3d2933a741
   4:     0x7500da7654ca - std::panicking::default_hook::{{closure}}::h3e9f25e2500cfcde
   5:     0x7500da76504f - std::panicking::default_hook::h24e4f38efb6a748f
   6:     0x7500d9790c43 - std[3914346c225bd5f0]::panicking::update_hook::<alloc[9ed1d44d7c4708bd]::boxed::Box<rustc_driver_impl[d8ce8b2ff3a6d9d7]::install_ice_hook::{closure#1}>>::{closure#0}
   7:     0x7500da765d43 - std::panicking::rust_panic_with_hook::h2c223ad0988ff703
   8:     0x7500da765a3a - std::panicking::begin_panic_handler::{{closure}}::h9b8934eb82bb206d
   9:     0x7500da761f39 - std::sys::backtrace::__rust_end_short_backtrace::hf5bd8833a69d3b26
  10:     0x7500da7656fd - __rustc[7b2f7a1b71ff6e74]::rust_begin_unwind
  11:     0x7500d7087540 - core::panicking::panic_fmt::hb28ab7e8d517e5a8
  12:     0x7500d86acd22 - <rustc_mir_transform[25414f5aada25492]::validate::CfgChecker>::fail::<alloc[9ed1d44d7c4708bd]::string::String>
  13:     0x7500dbec9116 - <rustc_mir_transform[25414f5aada25492]::validate::Validator as rustc_mir_transform[25414f5aada25492]::pass_manager::MirPass>::run_pass
  14:     0x7500dae03ace - rustc_mir_transform[25414f5aada25492]::pass_manager::run_passes_inner
  15:     0x7500db8c3143 - rustc_mir_transform[25414f5aada25492]::run_optimization_passes
  16:     0x7500db993ff2 - rustc_mir_transform[25414f5aada25492]::shim::make_shim
  17:     0x7500db99262f - rustc_query_impl[317f8e41882152a9]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[317f8e41882152a9]::query_impl::mir_shims::dynamic_query::{closure#2}::{closure#0}, rustc_middle[efd06070ee00b53c]::query::erase::Erased<[u8; 8usize]>>
  18:     0x7500db9925eb - <rustc_query_impl[317f8e41882152a9]::query_impl::mir_shims::dynamic_query::{closure#2} as core[818b365bbc1bf65]::ops::function::FnOnce<(rustc_middle[efd06070ee00b53c]::ty::context::TyCtxt, rustc_middle[efd06070ee00b53c]::ty::instance::InstanceKind)>>::call_once
  19:     0x7500db9925c3 - <rustc_query_system[dde7b6bcb3c3d2eb]::query::plumbing::execute_job_incr<rustc_query_impl[317f8e41882152a9]::DynamicConfig<rustc_query_system[dde7b6bcb3c3d2eb]::query::caches::DefaultCache<(rustc_middle[efd06070ee00b53c]::ty::predicate::Predicate, rustc_middle[efd06070ee00b53c]::traits::WellFormedLoc), rustc_middle[efd06070ee00b53c]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[317f8e41882152a9]::plumbing::QueryCtxt>::{closure#2}::{closure#2} as core[818b365bbc1bf65]::ops::function::FnOnce<((rustc_query_impl[317f8e41882152a9]::plumbing::QueryCtxt, rustc_query_impl[317f8e41882152a9]::DynamicConfig<rustc_query_system[dde7b6bcb3c3d2eb]::query::caches::DefaultCache<(rustc_middle[efd06070ee00b53c]::ty::predicate::Predicate, rustc_middle[efd06070ee00b53c]::traits::WellFormedLoc), rustc_middle[efd06070ee00b53c]::query::erase::Erased<[u8; 8usize]>>, false, false, false>), (rustc_middle[efd06070ee00b53c]::ty::predicate::Predicate, rustc_middle[efd06070ee00b53c]::traits::WellFormedLoc))>>::call_once
  20:     0x7500db78a278 - rustc_query_system[dde7b6bcb3c3d2eb]::query::plumbing::try_execute_query::<rustc_query_impl[317f8e41882152a9]::DynamicConfig<rustc_query_system[dde7b6bcb3c3d2eb]::query::caches::DefaultCache<rustc_middle[efd06070ee00b53c]::ty::instance::InstanceKind, rustc_middle[efd06070ee00b53c]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[317f8e41882152a9]::plumbing::QueryCtxt, true>
  21:     0x7500db789c61 - rustc_query_impl[317f8e41882152a9]::query_impl::mir_shims::get_query_incr::__rust_end_short_backtrace
  22:     0x7500d7c5c94c - <rustc_middle[efd06070ee00b53c]::ty::context::TyCtxt>::instance_mir
  23:     0x7500d7c5e137 - rustc_monomorphize[7bcb023248cd64b9]::mono_checks::check_mono_item
  24:     0x7500db785520 - rustc_query_impl[317f8e41882152a9]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[317f8e41882152a9]::query_impl::check_mono_item::dynamic_query::{closure#2}::{closure#0}, rustc_middle[efd06070ee00b53c]::query::erase::Erased<[u8; 0usize]>>
  25:     0x7500db783d35 - rustc_query_system[dde7b6bcb3c3d2eb]::query::plumbing::try_execute_query::<rustc_query_impl[317f8e41882152a9]::DynamicConfig<rustc_query_system[dde7b6bcb3c3d2eb]::query::caches::DefaultCache<rustc_middle[efd06070ee00b53c]::ty::instance::Instance, rustc_middle[efd06070ee00b53c]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[317f8e41882152a9]::plumbing::QueryCtxt, true>
  26:     0x7500db7836c0 - rustc_query_impl[317f8e41882152a9]::query_impl::check_mono_item::get_query_incr::__rust_end_short_backtrace
  27:     0x7500d7c67c29 - rustc_monomorphize[7bcb023248cd64b9]::collector::items_of_instance
  28:     0x7500dae166f2 - rustc_query_impl[317f8e41882152a9]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[317f8e41882152a9]::query_impl::items_of_instance::dynamic_query::{closure#2}::{closure#0}, rustc_middle[efd06070ee00b53c]::query::erase::Erased<[u8; 32usize]>>
  29:     0x7500dba321c5 - rustc_query_system[dde7b6bcb3c3d2eb]::query::plumbing::try_execute_query::<rustc_query_impl[317f8e41882152a9]::DynamicConfig<rustc_query_system[dde7b6bcb3c3d2eb]::query::caches::DefaultCache<(rustc_middle[efd06070ee00b53c]::ty::instance::Instance, rustc_middle[efd06070ee00b53c]::mir::mono::CollectionMode), rustc_middle[efd06070ee00b53c]::query::erase::Erased<[u8; 32usize]>>, false, false, false>, rustc_query_impl[317f8e41882152a9]::plumbing::QueryCtxt, true>
  30:     0x7500dba31375 - rustc_query_impl[317f8e41882152a9]::query_impl::items_of_instance::get_query_incr::__rust_end_short_backtrace
  31:     0x7500dba2ccf1 - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec::{closure#0}
  32:     0x7500dba2da67 - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  33:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  34:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  35:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  36:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  37:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  38:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  39:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  40:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  41:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  42:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  43:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  44:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  45:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  46:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  47:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  48:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  49:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  50:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  51:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  52:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  53:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  54:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  55:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  56:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  57:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  58:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  59:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  60:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  61:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  62:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  63:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  64:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  65:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  66:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  67:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  68:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  69:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  70:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  71:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  72:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  73:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  74:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  75:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  76:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  77:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  78:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  79:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  80:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  81:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  82:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  83:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  84:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  85:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  86:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  87:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  88:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  89:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  90:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  91:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  92:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  93:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  94:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  95:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  96:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  97:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  98:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
  99:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 100:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 101:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 102:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 103:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 104:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 105:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 106:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 107:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 108:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 109:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 110:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 111:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 112:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 113:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 114:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 115:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 116:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 117:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 118:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 119:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 120:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 121:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 122:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 123:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 124:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 125:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 126:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 127:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 128:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 129:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 130:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 131:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 132:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 133:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 134:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 135:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 136:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 137:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 138:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 139:     0x7500dba2e64c - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_items_rec
 140:     0x7500db29236b - rustc_monomorphize[7bcb023248cd64b9]::collector::collect_crate_mono_items::{closure#1}::{closure#0}
 141:     0x7500db59bb72 - rustc_monomorphize[7bcb023248cd64b9]::partitioning::collect_and_partition_mono_items
 142:     0x7500dc061d96 - rustc_query_impl[317f8e41882152a9]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[317f8e41882152a9]::query_impl::collect_and_partition_mono_items::dynamic_query::{closure#2}::{closure#0}, rustc_middle[efd06070ee00b53c]::query::erase::Erased<[u8; 40usize]>>
 143:     0x7500dc061d79 - <rustc_query_impl[317f8e41882152a9]::query_impl::collect_and_partition_mono_items::dynamic_query::{closure#2} as core[818b365bbc1bf65]::ops::function::FnOnce<(rustc_middle[efd06070ee00b53c]::ty::context::TyCtxt, ())>>::call_once
 144:     0x7500dc0608c9 - rustc_query_system[dde7b6bcb3c3d2eb]::query::plumbing::try_execute_query::<rustc_query_impl[317f8e41882152a9]::DynamicConfig<rustc_query_system[dde7b6bcb3c3d2eb]::query::caches::SingleCache<rustc_middle[efd06070ee00b53c]::query::erase::Erased<[u8; 40usize]>>, false, false, false>, rustc_query_impl[317f8e41882152a9]::plumbing::QueryCtxt, true>
 145:     0x7500dc06040b - rustc_query_impl[317f8e41882152a9]::query_impl::collect_and_partition_mono_items::get_query_incr::__rust_end_short_backtrace
 146:     0x7500dbf4abde - <rustc_codegen_llvm[8903238cde4e1616]::LlvmCodegenBackend as rustc_codegen_ssa[2c240239ec948151]::traits::backend::CodegenBackend>::codegen_crate
 147:     0x7500dbf35b5d - <rustc_interface[8b5ed5cc71808bfb]::queries::Linker>::codegen_and_build_linker
 148:     0x7500dbf33738 - rustc_interface[8b5ed5cc71808bfb]::passes::create_and_enter_global_ctxt::<core[818b365bbc1bf65]::option::Option<rustc_interface[8b5ed5cc71808bfb]::queries::Linker>, rustc_driver_impl[d8ce8b2ff3a6d9d7]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
 149:     0x7500dbe99666 - rustc_interface[8b5ed5cc71808bfb]::interface::run_compiler::<(), rustc_driver_impl[d8ce8b2ff3a6d9d7]::run_compiler::{closure#0}>::{closure#1}
 150:     0x7500dbe51786 - std[3914346c225bd5f0]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[8b5ed5cc71808bfb]::util::run_in_thread_with_globals<rustc_interface[8b5ed5cc71808bfb]::util::run_in_thread_pool_with_globals<rustc_interface[8b5ed5cc71808bfb]::interface::run_compiler<(), rustc_driver_impl[d8ce8b2ff3a6d9d7]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
 151:     0x7500dbe5142b - <<std[3914346c225bd5f0]::thread::Builder>::spawn_unchecked_<rustc_interface[8b5ed5cc71808bfb]::util::run_in_thread_with_globals<rustc_interface[8b5ed5cc71808bfb]::util::run_in_thread_pool_with_globals<rustc_interface[8b5ed5cc71808bfb]::interface::run_compiler<(), rustc_driver_impl[d8ce8b2ff3a6d9d7]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[818b365bbc1bf65]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
 152:     0x7500dbe52f3d - std::sys::pal::unix::thread::Thread::new::thread_start::h00f1215b5b464122
 153:     0x7500d5ca57eb - <unknown>
 154:     0x7500d5d2918c - <unknown>
 155:                0x0 - <unknown>

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: please make sure that you have updated to the latest nightly

note: please attach the file at `/home/sherlock/git/wiresquirrel/rustc-ice-2025-05-21T08_57_52-2466715.txt` to your bug report

note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C linker=clang -C incremental=[REDACTED] -C link-arg=-fuse-ld=/usr/bin/mold -C target_cpu=x86-64-v3

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

query stack during panic:
#0 [mir_shims] generating MIR shim for `core::future::async_drop::async_drop_in_place::{closure#0}`, instance=FutureDropPollShim(DefId(2:15347 ~ core[0818]::future::async_drop::async_drop_in_place::{closure#0}), Coroutine(DefId(2:15347 ~ core[0818]::future::async_drop::async_drop_in_place::{closure#0}), [Coroutine(DefId(20:1142 ~ wiresquirrel_core[a875]::quic::peer_manage::{impl#2}::connect_until_success::{closure#0}::{closure#0}::{closure#0}), [wiresquirrel_core::resolve::Resolver, i32, core::future::ResumeTy, (), (wiresquirrel_core::quic::peer_manage::PeerManager<wiresquirrel_core::resolve::Resolver>, core::result::Result<(), wiresquirrel_core::quic::Error>), CoroutineWitness(DefId(20:1142 ~ wiresquirrel_core[a875]::quic::peer_manage::{impl#2}::connect_until_success::{closure#0}::{closure#0}::{closure#0}), [wiresquirrel_core::resolve::Resolver]), (wiresquirrel_core::quic::peer_manage::PeerManager<wiresquirrel_core::resolve::Resolver>, &'{erased} &'{erased} wiresquirrel_core::quic::PublicKey)]), (), core::future::ResumeTy, (), (), CoroutineWitness(DefId(2:15347 ~ core[0818]::future::async_drop::async_drop_in_place::{closure#0}), [Coroutine(DefId(20:1142 ~ wiresquirrel_core[a875]::quic::peer_manage::{impl#2}::connect_until_success::{closure#0}::{closure#0}::{closure#0}), [wiresquirrel_core::resolve::Resolver, i32, core::future::ResumeTy, (), (wiresquirrel_core::quic::peer_manage::PeerManager<wiresquirrel_core::resolve::Resolver>, core::result::Result<(), wiresquirrel_core::quic::Error>), CoroutineWitness(DefId(20:1142 ~ wiresquirrel_core[a875]::quic::peer_manage::{impl#2}::connect_until_success::{closure#0}::{closure#0}::{closure#0}), [wiresquirrel_core::resolve::Resolver]), (wiresquirrel_core::quic::peer_manage::PeerManager<wiresquirrel_core::resolve::Resolver>, &'{erased} &'{erased} wiresquirrel_core::quic::PublicKey)])]), (*mut Coroutine(DefId(20:1142 ~ wiresquirrel_core[a875]::quic::peer_manage::{impl#2}::connect_until_success::{closure#0}::{closure#0}::{closure#0}), [wiresquirrel_core::resolve::Resolver, i32, core::future::ResumeTy, (), (wiresquirrel_core::quic::peer_manage::PeerManager<wiresquirrel_core::resolve::Resolver>, core::result::Result<(), wiresquirrel_core::quic::Error>), CoroutineWitness(DefId(20:1142 ~ wiresquirrel_core[a875]::quic::peer_manage::{impl#2}::connect_until_success::{closure#0}::{closure#0}::{closure#0}), [wiresquirrel_core::resolve::Resolver]), (wiresquirrel_core::quic::peer_manage::PeerManager<wiresquirrel_core::resolve::Resolver>, &'{erased} &'{erased} wiresquirrel_core::quic::PublicKey)]),)]), Coroutine(DefId(20:1142 ~ wiresquirrel_core[a875]::quic::peer_manage::{impl#2}::connect_until_success::{closure#0}::{closure#0}::{closure#0}), [wiresquirrel_core::resolve::Resolver, i32, core::future::ResumeTy, (), (wiresquirrel_core::quic::peer_manage::PeerManager<wiresquirrel_core::resolve::Resolver>, core::result::Result<(), wiresquirrel_core::quic::Error>), CoroutineWitness(DefId(20:1142 ~ wiresquirrel_core[a875]::quic::peer_manage::{impl#2}::connect_until_success::{closure#0}::{closure#0}::{closure#0}), [wiresquirrel_core::resolve::Resolver]), (wiresquirrel_core::quic::peer_manage::PeerManager<wiresquirrel_core::resolve::Resolver>, &'{erased} &'{erased} wiresquirrel_core::quic::PublicKey)]))
#1 [check_mono_item] monomorphization-time checking
... and 2 other queries... use `env RUST_BACKTRACE=1` to see the full query stack
warning: `wiresquirrel` (bin "wiresquirrel") generated 1 warning
error: could not compile `wiresquirrel` (bin "wiresquirrel"); 1 warning emitted

Caused by:
  process didn't exit successfully: `/home/sherlock/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc --crate-name wiresquirrel --edition=2024 cli/src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=125 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values())' -C metadata=3d40397987bb7d9b -C extra-filename=-117dfb1582d7f917 --out-dir /home/sherlock/git/wiresquirrel/target/debug/deps -C linker=clang -C incremental=/home/sherlock/git/wiresquirrel/target/debug/incremental -L dependency=/home/sherlock/git/wiresquirrel/target/debug/deps --extern tokio=/home/sherlock/git/wiresquirrel/target/debug/deps/libtokio-d6c16aecbc009c39.rlib --extern wiresquirrel_core=/home/sherlock/git/wiresquirrel/target/debug/deps/libwiresquirrel_core-be9a41139815fb86.rlib -C link-arg=-fuse-ld=/usr/bin/mold -C target_cpu=x86-64-v3 -L native=/home/sherlock/git/wiresquirrel/target/debug/build/aws-lc-sys-4c256d4dc61c1d3d/out` (exit status: 101)

@jieyouxu jieyouxu added E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example F-async_drop `#![feature(async_drop)]` labels May 21, 2025
@Noratrieb Noratrieb removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 1, 2025
@azhogin
Copy link
Contributor

azhogin commented Jun 4, 2025

Looks like duplicate of #140530.
Should be fixed by #141932.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example F-async_drop `#![feature(async_drop)]` 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

6 participants