@@ -137,29 +137,6 @@ impl Annotatable {
137137 }
138138}
139139
140- // A more flexible ItemDecorator.
141- pub trait MultiItemDecorator {
142- fn expand ( & self ,
143- ecx : & mut ExtCtxt < ' _ > ,
144- sp : Span ,
145- meta_item : & ast:: MetaItem ,
146- item : & Annotatable ,
147- push : & mut dyn FnMut ( Annotatable ) ) ;
148- }
149-
150- impl < F > MultiItemDecorator for F
151- where F : Fn ( & mut ExtCtxt < ' _ > , Span , & ast:: MetaItem , & Annotatable , & mut dyn FnMut ( Annotatable ) )
152- {
153- fn expand ( & self ,
154- ecx : & mut ExtCtxt < ' _ > ,
155- sp : Span ,
156- meta_item : & ast:: MetaItem ,
157- item : & Annotatable ,
158- push : & mut dyn FnMut ( Annotatable ) ) {
159- ( * self ) ( ecx, sp, meta_item, item, push)
160- }
161- }
162-
163140// `meta_item` is the annotation, and `item` is the item being modified.
164141// FIXME Decorators should follow the same pattern too.
165142pub trait MultiItemModifier {
@@ -581,14 +558,6 @@ pub enum SyntaxExtension {
581558 /// A trivial "extension" that does nothing, only keeps the attribute and marks it as known.
582559 NonMacroAttr { mark_used : bool } ,
583560
584- /// A syntax extension that is attached to an item and creates new items
585- /// based upon it.
586- ///
587- /// `#[derive(...)]` is a `MultiItemDecorator`.
588- ///
589- /// Prefer ProcMacro or MultiModifier since they are more flexible.
590- MultiDecorator ( Box < dyn MultiItemDecorator + sync:: Sync + sync:: Send > ) ,
591-
592561 /// A syntax extension that is attached to an item and modifies it
593562 /// in-place. Also allows decoration, i.e., creating new items.
594563 MultiModifier ( Box < dyn MultiItemModifier + sync:: Sync + sync:: Send > ) ,
@@ -658,7 +627,6 @@ impl SyntaxExtension {
658627 SyntaxExtension :: ProcMacro { .. } =>
659628 MacroKind :: Bang ,
660629 SyntaxExtension :: NonMacroAttr { .. } |
661- SyntaxExtension :: MultiDecorator ( ..) |
662630 SyntaxExtension :: MultiModifier ( ..) |
663631 SyntaxExtension :: AttrProcMacro ( ..) =>
664632 MacroKind :: Attr ,
@@ -688,7 +656,6 @@ impl SyntaxExtension {
688656 SyntaxExtension :: ProcMacroDerive ( .., edition) => edition,
689657 // Unstable legacy stuff
690658 SyntaxExtension :: NonMacroAttr { .. } |
691- SyntaxExtension :: MultiDecorator ( ..) |
692659 SyntaxExtension :: MultiModifier ( ..) |
693660 SyntaxExtension :: BuiltinDerive ( ..) => default_edition,
694661 }
0 commit comments