Fix EII - #962
Conversation
|
It seems there's some interactions with the inline attribute that should be handled as well. #![crate_type = "rlib"]
#![feature(extern_item_impls)]
#[eii(eii1)]
#[inline]
pub fn decl1(x: u64) {
println!("default {x}");
}panics with this warning: Please add this as a test in |
Hi, thanks for your review. I investigated this further and found that this isn't only a attribute interaction issue with cg_gcc; it could also lead to unexpected behavior on cg_llvm. I've reported this upstream: rust-lang/rust#161650. bjorn3 suggested denying Therefore if we add this check in rustc, the given example will produce a compile error before reaching cg_gcc instead of triggering an ICE. Would you prefer to wait for the upstream fix for now? |
|
I'm OK with merging this PR now. |
Yes it's ready. Thanks! 😃 |
|
Thanks for your contribution! |
|
Nice work! |
Fix support for EII functions with defaults and EII statics. Now all
tests/ui/eiitests pass.