Skip to content

[ICE]: trait bounds on EII not yet supported #154533

Open

Description

@Anonymous1-design

Code

//@ compile-flags: -Znext-solver=globally

#![feature(extern_item_impls)]
#[eii] 
async fn hello_impl() {}

Meta

rustc --version --verbose:

rustc 1.96.0-nightly (23903d01c 2026-03-26)
binary: rustc
commit-hash: 23903d01c237d7c7d4fb62b82ca846bc45de4e0c
commit-date: 2026-03-26
host: x86_64-unknown-linux-gnu
release: 1.96.0-nightly
LLVM version: 22.1.2

Error output

error: functions in `extern` blocks cannot have `async` qualifier
 --> bug.rs:3:1
  |
2 | #[eii] 
  | ------ in this `extern` block
3 | async fn hello_impl() {}
  | ^^^^^ help: remove the `async` qualifier

error[E0601]: `main` function not found in crate `bug`
 --> bug.rs:3:25
  |
3 | async fn hello_impl() {}
  |                         ^ consider adding a `main` function to `bug.rs`

Backtrace

thread 'rustc' (1983380) panicked at /rustc-dev/23903d01c237d7c7d4fb62b82ca846bc45de4e0c/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs:3924:17:
trait bounds on EII not yet supported 
stack backtrace:
   0:     0x7f75400e79bb - <<std[b302fb27a3f91e2e]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[eeb74f28e99c9360]::fmt::Display>::fmt
   1:     0x7f7540793348 - core[eeb74f28e99c9360]::fmt::write
   2:     0x7f75400fe9c6 - <std[b302fb27a3f91e2e]::sys::stdio::unix::Stderr as std[b302fb27a3f91e2e]::io::Write>::write_fmt
   3:     0x7f75400bd9c8 - std[b302fb27a3f91e2e]::panicking::default_hook::{closure#0}
   4:     0x7f75400dadc3 - std[b302fb27a3f91e2e]::panicking::default_hook
   5:     0x7f753f0e029c - std[b302fb27a3f91e2e]::panicking::update_hook::<alloc[ae169e729e5df420]::boxed::Box<rustc_driver_impl[1043facd4a3b5a1e]::install_ice_hook::{closure#1}>>::{closure#0}
   6:     0x7f75400db0a2 - std[b302fb27a3f91e2e]::panicking::panic_with_hook
   7:     0x7f75400bdaba - std[b302fb27a3f91e2e]::panicking::panic_handler::{closure#0}
   8:     0x7f75400b47b9 - std[b302fb27a3f91e2e]::sys::backtrace::__rust_end_short_backtrace::<std[b302fb27a3f91e2e]::panicking::panic_handler::{closure#0}, !>
   9:     0x7f75400bf4ed - __rustc[8f8d3949772fcde8]::rust_begin_unwind
  10:     0x7f753d21116c - core[eeb74f28e99c9360]::panicking::panic_fmt
  11:     0x7f753fe0f724 - <rustc_trait_selection[4af0f86042d1add3]::error_reporting::TypeErrCtxt>::note_obligation_cause_code::<rustc_span[e6c053b2fe5f7640]::ErrorGuaranteed, rustc_middle[fca09ee1eeeaccd3]::ty::predicate::Predicate>
  12:     0x7f753fecb8d2 - <rustc_trait_selection[4af0f86042d1add3]::error_reporting::TypeErrCtxt>::note_obligation_cause
  13:     0x7f753e945a48 - <rustc_trait_selection[4af0f86042d1add3]::error_reporting::TypeErrCtxt>::report_fulfillment_errors
  14:     0x7f753f289b16 - rustc_hir_analysis[6a03357fbbae8c8c]::check::compare_eii::compare_eii_function_types
  15:     0x7f7541034bac - rustc_hir_analysis[6a03357fbbae8c8c]::check::wfcheck::check_item_fn
  16:     0x7f7540cbd487 - rustc_hir_analysis[6a03357fbbae8c8c]::check::check::check_item_type
  17:     0x7f7540cb9726 - rustc_hir_analysis[6a03357fbbae8c8c]::check::wfcheck::check_well_formed
  18:     0x7f7540cb9707 - rustc_query_impl[36767619dcd2566]::query_impl::check_well_formed::invoke_provider_fn::__rust_begin_short_backtrace
  19:     0x7f7540cb8d24 - rustc_query_impl[36767619dcd2566]::execution::try_execute_query::<rustc_data_structures[18b11a475be38cee]::vec_cache::VecCache<rustc_span[e6c053b2fe5f7640]::def_id::LocalDefId, rustc_middle[fca09ee1eeeaccd3]::query::erase::ErasedData<[u8; 1usize]>, rustc_middle[fca09ee1eeeaccd3]::dep_graph::graph::DepNodeIndex>, false>
  20:     0x7f7540cb8abb - rustc_query_impl[36767619dcd2566]::query_impl::check_well_formed::execute_query_non_incr::__rust_end_short_backtrace
  21:     0x7f7540cb504b - rustc_hir_analysis[6a03357fbbae8c8c]::check::wfcheck::check_type_wf
  22:     0x7f7540cb4f55 - rustc_query_impl[36767619dcd2566]::query_impl::check_type_wf::invoke_provider_fn::__rust_begin_short_backtrace
  23:     0x7f754198fb10 - rustc_query_impl[36767619dcd2566]::execution::try_execute_query::<rustc_middle[fca09ee1eeeaccd3]::query::caches::SingleCache<rustc_middle[fca09ee1eeeaccd3]::query::erase::ErasedData<[u8; 1usize]>>, false>
  24:     0x7f754198f7e9 - rustc_query_impl[36767619dcd2566]::query_impl::check_type_wf::execute_query_non_incr::__rust_end_short_backtrace
  25:     0x7f7541179c73 - rustc_hir_analysis[6a03357fbbae8c8c]::check_crate
  26:     0x7f754087bb20 - rustc_interface[e1e6c05c12b55e19]::passes::analysis
  27:     0x7f7541992289 - rustc_query_impl[36767619dcd2566]::execution::try_execute_query::<rustc_middle[fca09ee1eeeaccd3]::query::caches::SingleCache<rustc_middle[fca09ee1eeeaccd3]::query::erase::ErasedData<[u8; 0usize]>>, false>
  28:     0x7f7541992069 - rustc_query_impl[36767619dcd2566]::query_impl::analysis::execute_query_non_incr::__rust_end_short_backtrace
  29:     0x7f75419503d4 - rustc_interface[e1e6c05c12b55e19]::interface::run_compiler::<(), rustc_driver_impl[1043facd4a3b5a1e]::run_compiler::{closure#0}>::{closure#1}
  30:     0x7f754193b5fe - std[b302fb27a3f91e2e]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[e1e6c05c12b55e19]::util::run_in_thread_with_globals<rustc_interface[e1e6c05c12b55e19]::util::run_in_thread_pool_with_globals<rustc_interface[e1e6c05c12b55e19]::interface::run_compiler<(), rustc_driver_impl[1043facd4a3b5a1e]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  31:     0x7f754193bea0 - <std[b302fb27a3f91e2e]::thread::lifecycle::spawn_unchecked<rustc_interface[e1e6c05c12b55e19]::util::run_in_thread_with_globals<rustc_interface[e1e6c05c12b55e19]::util::run_in_thread_pool_with_globals<rustc_interface[e1e6c05c12b55e19]::interface::run_compiler<(), rustc_driver_impl[1043facd4a3b5a1e]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[eeb74f28e99c9360]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  32:     0x7f754193cd2c - <std[b302fb27a3f91e2e]::sys::thread::unix::Thread>::new::thread_start
  33:     0x7f753b50a609 - start_thread
                               at /build/glibc-B3wQXB/glibc-2.31/nptl/pthread_create.c:477:8
  34:     0x7f753b42f353 - clone
                               at /build/glibc-B3wQXB/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95:0
  35:                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 `Study/Traitor/trait-fuzzer/test/rustc-ice-2026-03-29T06_03_29-1983370.txt` to your bug report

note: rustc 1.96.0-nightly (23903d01c 2026-03-26) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z next-solver=globally

query stack during panic:
#0 [check_well_formed] checking that `_::hello_impl` is well-formed
#1 [check_type_wf] checking that types are well-formed
... and 1 other queries... use `env RUST_BACKTRACE=1` to see the full query stack
error: aborting due to 2 previous errors

command: rustc -Znext-solver=globally

Activity

  1. added
    I-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.
    C-bugCategory: This is a bug.
    on Mar 29, 2026
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Mar 29, 2026
  3. added
    WG-trait-system-refactorThe Rustc Trait System Refactor Initiative (-Znext-solver)
    and removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Mar 29, 2026
  4. Helios531 commented on Apr 2, 2026

    @Helios531

    @reddevilmidzy Can I work on this issue?

  5. reddevilmidzy commented on Apr 3, 2026

    @reddevilmidzy
    Member

    @reddevilmidzy Can I work on this issue?

    Sure, you can assign yourself use command @rustbot claim

  6. AsakuraMizu commented on Sep 9, 2026

    @AsakuraMizu
    Contributor

    This issue is no longer reproducible. The last reproducible rustc version is nightly-2026-06-25. It seems that this has been fixed by #156742.

  7. added
    E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.
    on Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.F-extern_item_impls`#![feature(extern_item_impls)]`I-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.WG-trait-system-refactorThe Rustc Trait System Refactor Initiative (-Znext-solver)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions