]> git.proxmox.com Git - rustc.git/blob - src/test/rustdoc/attributes.rs
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / rustdoc / attributes.rs
1 #![crate_name = "foo"]
2
3 // @has foo/fn.f.html '//*[@class="docblock attributes"]' '#[no_mangle]'
4 #[no_mangle]
5 pub extern "C" fn f() {}
6
7 // @has foo/fn.g.html '//*[@class="docblock attributes"]' '#[export_name = "bar"]'
8 #[export_name = "bar"]
9 pub extern "C" fn g() {}
10
11 // @has foo/enum.Foo.html '//*[@class="docblock attributes top-attr"]' '#[repr(i64)]'
12 // @has foo/enum.Foo.html '//*[@class="docblock attributes top-attr"]' '#[must_use]'
13 #[repr(i64)]
14 #[must_use]
15 pub enum Foo {
16 Bar,
17 }
18
19 // @has foo/struct.Repr.html '//*[@class="docblock attributes top-attr"]' '#[repr(C, align(8))]'
20 #[repr(C, align(8))]
21 pub struct Repr;