blob: 268c5bc16fd849067fdd14aeb5391d0705575707 [file] [log] [blame] [edit]
//@ compile-flags: --crate-type rlib
//@ check-pass
// Uses manual desugaring of EII internals:
// Tests whether it's okay to implement an unsafe EII with an unsafe implementation.
#![feature(extern_item_impls)]
#![feature(decl_macro)]
#![feature(rustc_attrs)]
#![feature(eii_internals)]
#[eii_extern_target(bar, "unsafe")]
#[rustc_builtin_macro(eii_shared_macro)]
macro foo() {}
unsafe extern "Rust" {
safe fn bar(x: u64) -> u64;
}
#[unsafe(foo)]
fn other(x: u64) -> u64 {
x
}
fn main() {
bar(0);
}