about summary refs log tree commit diff
path: root/tests/rustdoc/attributes-2021-edition.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc/attributes-2021-edition.rs')
-rw-r--r--tests/rustdoc/attributes-2021-edition.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/rustdoc/attributes-2021-edition.rs b/tests/rustdoc/attributes-2021-edition.rs
new file mode 100644
index 00000000000..b5028d8c852
--- /dev/null
+++ b/tests/rustdoc/attributes-2021-edition.rs
@@ -0,0 +1,14 @@
+//@ edition: 2021
+#![crate_name = "foo"]
+
+//@ has foo/fn.f.html '//pre[@class="rust item-decl"]' '#[unsafe(no_mangle)]'
+#[no_mangle]
+pub extern "C" fn f() {}
+
+//@ has foo/fn.g.html '//pre[@class="rust item-decl"]' '#[unsafe(export_name = "bar")]'
+#[export_name = "bar"]
+pub extern "C" fn g() {}
+
+//@ has foo/fn.example.html '//pre[@class="rust item-decl"]' '#[unsafe(link_section = ".text")]'
+#[link_section = ".text"]
+pub extern "C" fn example() {}