]> git.proxmox.com Git - rustc.git/blob - src/test/ui/proc-macro/macros-in-extern-rpass.rs
New upstream version 1.39.0+dfsg1
[rustc.git] / src / test / ui / proc-macro / macros-in-extern-rpass.rs
1 // run-pass
2 // aux-build:test-macros-rpass.rs
3 // ignore-wasm32
4
5 #![feature(macros_in_extern)]
6
7 extern crate test_macros_rpass as test_macros;
8
9 use test_macros::{nop_attr, no_output, emit_input};
10
11 fn main() {
12 assert_eq!(unsafe { rust_get_test_int() }, 1isize);
13 assert_eq!(unsafe { rust_dbg_extern_identity_u32(0xDEADBEEF) }, 0xDEADBEEF);
14 }
15
16 #[link(name = "rust_test_helpers", kind = "static")]
17 extern {
18 #[no_output]
19 fn some_definitely_unknown_symbol_which_should_be_removed();
20
21 #[nop_attr]
22 fn rust_get_test_int() -> isize;
23
24 emit_input!(fn rust_dbg_extern_identity_u32(arg: u32) -> u32;);
25 }