about summary refs log tree commit diff
path: root/compiler/rustc_macros/src/lib.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-02-13 23:49:28 +0000
committerMichael Goulet <michael@errs.io>2024-02-16 15:07:37 +0000
commit3250e953050be1a6867aac3745742f86ab406361 (patch)
tree6b2572c184c33e88b8d15dcde4cf94eb0db07e8a /compiler/rustc_macros/src/lib.rs
parentc9a7db6e20c8892f770b94dd6d5a16a03721b658 (diff)
downloadrust-3250e953050be1a6867aac3745742f86ab406361.tar.gz
rust-3250e953050be1a6867aac3745742f86ab406361.zip
Add a simple extension trait derive
Diffstat (limited to 'compiler/rustc_macros/src/lib.rs')
-rw-r--r--compiler/rustc_macros/src/lib.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_macros/src/lib.rs b/compiler/rustc_macros/src/lib.rs
index af65c908ee6..841f5c06126 100644
--- a/compiler/rustc_macros/src/lib.rs
+++ b/compiler/rustc_macros/src/lib.rs
@@ -14,6 +14,7 @@ use proc_macro::TokenStream;
 
 mod current_version;
 mod diagnostics;
+mod extension;
 mod hash_stable;
 mod lift;
 mod query;
@@ -40,6 +41,11 @@ pub fn symbols(input: TokenStream) -> TokenStream {
     symbols::symbols(input.into()).into()
 }
 
+#[proc_macro_attribute]
+pub fn extension(_attr: TokenStream, input: TokenStream) -> TokenStream {
+    extension::extension(input)
+}
+
 decl_derive!([HashStable, attributes(stable_hasher)] => hash_stable::hash_stable_derive);
 decl_derive!(
     [HashStable_Generic, attributes(stable_hasher)] =>