blob: 200905b8753a0716f5f430bc1842103f3d7273d0 [file]
//@ run-pass
//@ check-run-results
//@ ignore-backends: gcc
// FIXME: linking on windows (specifically mingw) not yet supported, see tracking issue #125418
//@ ignore-windows
// Tests EIIs with default implementations.
// In the same crate, the explicit implementation should get priority.
#![feature(extern_item_impls)]
#[eii(eii1)]
pub fn decl1(x: u64) {
//~^ WARN function `decl1` is never used
println!("default {x}");
}
#[eii1]
pub fn decl2(x: u64) {
println!("explicit {x}");
}
fn main() {
decl1(4);
}