mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 01:05:39 +03:00
25 lines
554 B
Rust
25 lines
554 B
Rust
//@ run-pass
|
|
//@ check-run-results
|
|
//@ aux-build: codegen2.rs
|
|
//@ compile-flags: -O
|
|
//@ ignore-backends: gcc
|
|
// FIXME: linking on windows (speciifcally mingw) not yet supported, see tracking issue #125418
|
|
//@ ignore-windows
|
|
// Tests whether calling EIIs works with the declaration in another crate.
|
|
#![feature(extern_item_impls)]
|
|
|
|
extern crate codegen2 as codegen;
|
|
|
|
#[codegen::eii1]
|
|
fn eii1_impl(x: u64) {
|
|
println!("{x:?}")
|
|
}
|
|
|
|
// what you would write:
|
|
fn main() {
|
|
// directly
|
|
eii1_impl(21);
|
|
// through the alias
|
|
codegen::decl1(42);
|
|
}
|