Naked functions as eii-impl are not work.
- without default impl — error: impl not found
- with default impl — used default impl instead of external impl, without errors by rustc or linker
Reproducible examples
Without default impl:
#[eii(requires_impl)]
unsafe extern "C" fn entry_eh(_: usize);
#[crate::requires_impl]
#[unsafe(naked)]
unsafe extern "C" fn eh(_: usize) { core::arch::naked_asm!("nop"); }
With default impl:
#[eii(opt_impl)]
unsafe extern "C" fn entry_eh(_: usize) { println!("called default") }
#[crate::opt_impl]
#[unsafe(naked)]
unsafe extern "C" fn eh(_: usize) { core::arch::naked_asm!("nop"); }
Expected
I hope it's possible to have naked impls, but as explained there (comment) — may not be possible, so I expecting proper errors.
I'd expect error with some explanation in case of default impl;
and error with explanation better then "just not found" in case without default impl.
Meta
rustc --version --verbose:
rustc 1.98.0-nightly (8b6558a02 2026-06-20)
binary: rustc
commit-hash: 8b6558a02b2774acfb25cf15e199467c37ba7490
commit-date: 2026-06-20
host: aarch64-apple-darwin
release: 1.98.0-nightly
LLVM version: 22.1.7
Related
Naked functions as
eii-impl are not work.Reproducible examples
Without default impl:
With default impl:
Expected
I hope it's possible to have naked impls, but as explained there (comment) — may not be possible, so I expecting proper errors.
I'd expect error with some explanation in case of default impl;
and error with explanation better then "just not found" in case without default impl.
Meta
rustc --version --verbose:Related