]> git.lizzy.rs Git - rust.git/commitdiff
Clarify `SyntaxExtensionKind::LegacyDerive`.
authorNicholas Nethercote <n.nethercote@gmail.com>
Wed, 23 Nov 2022 04:31:02 +0000 (15:31 +1100)
committerNicholas Nethercote <n.nethercote@gmail.com>
Thu, 24 Nov 2022 22:13:27 +0000 (09:13 +1100)
compiler/rustc_expand/src/base.rs

index bdcd53349492ccb98945ee4a41a8fe5c39e8adda..8955abebf1e0f0d116d100e84ba1f0b1e9c12e3d 100644 (file)
@@ -676,8 +676,13 @@ pub enum SyntaxExtensionKind {
 
     /// A token-based derive macro.
     Derive(
-        /// An expander with signature TokenStream -> TokenStream (not yet).
+        /// An expander with signature TokenStream -> TokenStream.
         /// The produced TokenSteam is appended to the input TokenSteam.
+        ///
+        /// FIXME: The text above describes how this should work. Currently it
+        /// is handled identically to `LegacyDerive`. It should be migrated to
+        /// a token-based representation like `Bang` and `Attr`, instead of
+        /// using `MultiItemModifier`.
         Box<dyn MultiItemModifier + sync::Sync + sync::Send>,
     ),