]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/export-no-mangle.rs
Rollup merge of #69311 - GuillaumeGomez:clean-up-e0321-e0322, r=Dylan-DPC
[rust.git] / src / test / codegen / export-no-mangle.rs
1 // compile-flags: -C no-prepopulate-passes
2
3 #![crate_type = "lib"]
4
5 mod private {
6     // CHECK: @FOO =
7     #[no_mangle]
8     pub static FOO: u32 = 3;
9
10     // CHECK: @BAR =
11     #[export_name = "BAR"]
12     static BAR: u32 = 3;
13
14     // CHECK: void @foo()
15     #[no_mangle]
16     pub extern fn foo() {}
17
18     // CHECK: void @bar()
19     #[export_name = "bar"]
20     extern fn bar() {}
21 }