@@ -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 {
@@ -578,14 +555,6 @@ pub enum SyntaxExtension {
578555 /// A trivial "extension" that does nothing, only keeps the attribute and marks it as known.
579556 NonMacroAttr { mark_used : bool } ,
580557
581- /// A syntax extension that is attached to an item and creates new items
582- /// based upon it.
583- ///
584- /// `#[derive(...)]` is a `MultiItemDecorator`.
585- ///
586- /// Prefer ProcMacro or MultiModifier since they are more flexible.
587- MultiDecorator ( Box < dyn MultiItemDecorator + sync:: Sync + sync:: Send > ) ,
588-
589558 /// A syntax extension that is attached to an item and modifies it
590559 /// in-place. Also allows decoration, i.e., creating new items.
591560 MultiModifier ( Box < dyn MultiItemModifier + sync:: Sync + sync:: Send > ) ,
@@ -655,7 +624,6 @@ impl SyntaxExtension {
655624 SyntaxExtension :: ProcMacro { .. } =>
656625 MacroKind :: Bang ,
657626 SyntaxExtension :: NonMacroAttr { .. } |
658- SyntaxExtension :: MultiDecorator ( ..) |
659627 SyntaxExtension :: MultiModifier ( ..) |
660628 SyntaxExtension :: AttrProcMacro ( ..) =>
661629 MacroKind :: Attr ,
@@ -685,7 +653,6 @@ impl SyntaxExtension {
685653 SyntaxExtension :: ProcMacroDerive ( .., edition) => edition,
686654 // Unstable legacy stuff
687655 SyntaxExtension :: NonMacroAttr { .. } |
688- SyntaxExtension :: MultiDecorator ( ..) |
689656 SyntaxExtension :: MultiModifier ( ..) |
690657 SyntaxExtension :: BuiltinDerive ( ..) => default_edition,
691658 }
0 commit comments