[ICE]: trait bounds on EII not yet supported
Open
Nobody has claimed this yet.
C-bug
F-extern_item_impls
I-ICE
T-compiler
WG-trait-system-refactor
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the ICE with the supplied rustc -Znext-solver=globally example and inspect compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs around line 3924. Trace the compare_eii_function_types path shown in the query stack and use the existing diagnostic behavior as guidance. Done means this input no longer panics and reports an appropriate compiler error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100