summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-gui/src/proc_macro_test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc-gui/src/proc_macro_test')
-rw-r--r--tests/rustdoc-gui/src/proc_macro_test/Cargo.lock7
-rw-r--r--tests/rustdoc-gui/src/proc_macro_test/Cargo.toml8
-rw-r--r--tests/rustdoc-gui/src/proc_macro_test/lib.rs11
3 files changed, 26 insertions, 0 deletions
diff --git a/tests/rustdoc-gui/src/proc_macro_test/Cargo.lock b/tests/rustdoc-gui/src/proc_macro_test/Cargo.lock
new file mode 100644
index 000000000..eae9d7536
--- /dev/null
+++ b/tests/rustdoc-gui/src/proc_macro_test/Cargo.lock
@@ -0,0 +1,7 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "proc_macro_test"
+version = "0.1.0"
diff --git a/tests/rustdoc-gui/src/proc_macro_test/Cargo.toml b/tests/rustdoc-gui/src/proc_macro_test/Cargo.toml
new file mode 100644
index 000000000..768ced651
--- /dev/null
+++ b/tests/rustdoc-gui/src/proc_macro_test/Cargo.toml
@@ -0,0 +1,8 @@
+[package]
+name = "proc_macro_test"
+version = "0.1.0"
+edition = "2021"
+
+[lib]
+path = "lib.rs"
+proc-macro = true
diff --git a/tests/rustdoc-gui/src/proc_macro_test/lib.rs b/tests/rustdoc-gui/src/proc_macro_test/lib.rs
new file mode 100644
index 000000000..8a6c62df8
--- /dev/null
+++ b/tests/rustdoc-gui/src/proc_macro_test/lib.rs
@@ -0,0 +1,11 @@
+use proc_macro::TokenStream;
+
+#[proc_macro]
+pub fn make_answer(_item: TokenStream) -> TokenStream {
+ "fn answer() -> u32 { 42 }".parse().unwrap()
+}
+
+#[proc_macro_derive(HelperAttr, attributes(helper))]
+pub fn derive_helper_attr(_item: TokenStream) -> TokenStream {
+ TokenStream::new()
+}