2017-02-09 05:15:20 +08:00
|
|
|
#![crate_name = "foo"]
|
|
|
|
|
2023-01-31 02:05:12 +08:00
|
|
|
// @has foo/fn.f.html '//pre[@class="rust item-decl"]' '#[no_mangle]'
|
2017-02-09 05:15:20 +08:00
|
|
|
#[no_mangle]
|
|
|
|
pub extern "C" fn f() {}
|
|
|
|
|
2023-01-31 02:05:12 +08:00
|
|
|
// @has foo/fn.g.html '//pre[@class="rust item-decl"]' '#[export_name = "bar"]'
|
2017-02-09 05:15:20 +08:00
|
|
|
#[export_name = "bar"]
|
|
|
|
pub extern "C" fn g() {}
|
|
|
|
|
2023-01-31 02:05:12 +08:00
|
|
|
// @has foo/struct.Repr.html '//pre[@class="rust item-decl"]' '#[repr(C, align(8))]'
|
2020-03-04 07:41:32 +08:00
|
|
|
#[repr(C, align(8))]
|
|
|
|
pub struct Repr;
|