diff options
author | Jonas Schievink <[email protected]> | 2020-08-15 14:34:56 +0100 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2020-08-15 14:34:56 +0100 |
commit | bee56e68a3e6b8d70bd8320f6372b95959e377df (patch) | |
tree | 53b1b8494cda229c6dc0a875ddfbb3ed18b61a4b /crates | |
parent | cb816b1ea87b24f34eeecfdd98aeeb629915d661 (diff) |
Hacky support for fn-like proc macros
Diffstat (limited to 'crates')
-rw-r--r-- | crates/proc_macro_api/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/proc_macro_api/src/lib.rs b/crates/proc_macro_api/src/lib.rs index 15db57eb2..d5e87cf7d 100644 --- a/crates/proc_macro_api/src/lib.rs +++ b/crates/proc_macro_api/src/lib.rs | |||
@@ -89,9 +89,8 @@ impl ProcMacroClient { | |||
89 | macros | 89 | macros |
90 | .into_iter() | 90 | .into_iter() |
91 | .filter_map(|(name, kind)| { | 91 | .filter_map(|(name, kind)| { |
92 | // FIXME: Support custom derive only for now. | ||
93 | match kind { | 92 | match kind { |
94 | ProcMacroKind::CustomDerive => { | 93 | ProcMacroKind::CustomDerive | ProcMacroKind::FuncLike => { |
95 | let name = SmolStr::new(&name); | 94 | let name = SmolStr::new(&name); |
96 | let expander: Arc<dyn tt::TokenExpander> = | 95 | let expander: Arc<dyn tt::TokenExpander> = |
97 | Arc::new(ProcMacroProcessExpander { | 96 | Arc::new(ProcMacroProcessExpander { |
@@ -101,7 +100,8 @@ impl ProcMacroClient { | |||
101 | }); | 100 | }); |
102 | Some((name, expander)) | 101 | Some((name, expander)) |
103 | } | 102 | } |
104 | _ => None, | 103 | // FIXME: Attribute macro are currently unsupported. |
104 | ProcMacroKind::Attr => None, | ||
105 | } | 105 | } |
106 | }) | 106 | }) |
107 | .collect() | 107 | .collect() |