2017-02-08 21:15:20 +00:00
|
|
|
#![crate_name = "foo"]
|
|
|
|
|
|
|
|
// @has foo/fn.f.html '//*[@class="docblock attributes"]' '#[no_mangle]'
|
|
|
|
#[no_mangle]
|
|
|
|
pub extern "C" fn f() {}
|
|
|
|
|
|
|
|
// @has foo/fn.g.html '//*[@class="docblock attributes"]' '#[export_name = "bar"]'
|
|
|
|
#[export_name = "bar"]
|
|
|
|
pub extern "C" fn g() {}
|
|
|
|
|
2020-06-28 18:20:06 -04:00
|
|
|
// @matches foo/enum.Foo.html '//*[@class="docblock attributes top-attr"]' \
|
|
|
|
// '(?m)\A#\[repr\(i64\)\]\n#\[must_use\]\Z'
|
2017-02-08 21:15:20 +00:00
|
|
|
#[repr(i64)]
|
|
|
|
#[must_use]
|
|
|
|
pub enum Foo {
|
|
|
|
Bar,
|
|
|
|
}
|
2020-03-03 23:41:32 +00:00
|
|
|
|
2020-03-17 15:08:44 +01:00
|
|
|
// @has foo/struct.Repr.html '//*[@class="docblock attributes top-attr"]' '#[repr(C, align(8))]'
|
2020-03-03 23:41:32 +00:00
|
|
|
#[repr(C, align(8))]
|
|
|
|
pub struct Repr;
|