@@ -28,7 +28,7 @@ use std::collections::HashMap;
2828use std:: iter;
2929use std:: path:: PathBuf ;
3030use std:: rc:: Rc ;
31- use rustc_data_structures:: sync:: Lrc ;
31+ use rustc_data_structures:: sync:: { self , Lrc } ;
3232use std:: default:: Default ;
3333use tokenstream:: { self , TokenStream } ;
3434
@@ -529,26 +529,26 @@ pub enum SyntaxExtension {
529529 /// `#[derive(...)]` is a `MultiItemDecorator`.
530530 ///
531531 /// Prefer ProcMacro or MultiModifier since they are more flexible.
532- MultiDecorator ( Box < MultiItemDecorator > ) ,
532+ MultiDecorator ( Box < MultiItemDecorator + sync :: Sync + sync :: Send > ) ,
533533
534534 /// A syntax extension that is attached to an item and modifies it
535535 /// in-place. Also allows decoration, i.e., creating new items.
536- MultiModifier ( Box < MultiItemModifier > ) ,
536+ MultiModifier ( Box < MultiItemModifier + sync :: Sync + sync :: Send > ) ,
537537
538538 /// A function-like procedural macro. TokenStream -> TokenStream.
539- ProcMacro ( Box < ProcMacro > ) ,
539+ ProcMacro ( Box < ProcMacro + sync :: Sync + sync :: Send > ) ,
540540
541541 /// An attribute-like procedural macro. TokenStream, TokenStream -> TokenStream.
542542 /// The first TokenSteam is the attribute, the second is the annotated item.
543543 /// Allows modification of the input items and adding new items, similar to
544544 /// MultiModifier, but uses TokenStreams, rather than AST nodes.
545- AttrProcMacro ( Box < AttrProcMacro > ) ,
545+ AttrProcMacro ( Box < AttrProcMacro + sync :: Sync + sync :: Send > ) ,
546546
547547 /// A normal, function-like syntax extension.
548548 ///
549549 /// `bytes!` is a `NormalTT`.
550550 NormalTT {
551- expander : Box < TTMacroExpander > ,
551+ expander : Box < TTMacroExpander + sync :: Sync + sync :: Send > ,
552552 def_info : Option < ( ast:: NodeId , Span ) > ,
553553 /// Whether the contents of the macro can
554554 /// directly use `#[unstable]` things (true == yes).
@@ -563,21 +563,23 @@ pub enum SyntaxExtension {
563563 /// A function-like syntax extension that has an extra ident before
564564 /// the block.
565565 ///
566- IdentTT ( Box < IdentMacroExpander > , Option < Span > , bool ) ,
566+ IdentTT ( Box < IdentMacroExpander + sync :: Sync + sync :: Send > , Option < Span > , bool ) ,
567567
568568 /// An attribute-like procedural macro. TokenStream -> TokenStream.
569569 /// The input is the annotated item.
570570 /// Allows generating code to implement a Trait for a given struct
571571 /// or enum item.
572- ProcMacroDerive ( Box < MultiItemModifier > , Vec < Symbol > /* inert attribute names */ ) ,
572+ ProcMacroDerive ( Box < MultiItemModifier +
573+ sync:: Sync +
574+ sync:: Send > , Vec < Symbol > /* inert attribute names */ ) ,
573575
574576 /// An attribute-like procedural macro that derives a builtin trait.
575577 BuiltinDerive ( BuiltinDeriveFn ) ,
576578
577579 /// A declarative macro, e.g. `macro m() {}`.
578580 ///
579581 /// The second element is the definition site span.
580- DeclMacro ( Box < TTMacroExpander > , Option < ( ast:: NodeId , Span ) > ) ,
582+ DeclMacro ( Box < TTMacroExpander + sync :: Sync + sync :: Send > , Option < ( ast:: NodeId , Span ) > ) ,
581583}
582584
583585impl SyntaxExtension {
0 commit comments