@@ -28,7 +28,7 @@ use std::collections::HashMap;
28
28
use std:: iter;
29
29
use std:: path:: PathBuf ;
30
30
use std:: rc:: Rc ;
31
- use rustc_data_structures:: sync:: Lrc ;
31
+ use rustc_data_structures:: sync:: { self , Lrc } ;
32
32
use std:: default:: Default ;
33
33
use tokenstream:: { self , TokenStream } ;
34
34
@@ -529,26 +529,26 @@ pub enum SyntaxExtension {
529
529
/// `#[derive(...)]` is a `MultiItemDecorator`.
530
530
///
531
531
/// Prefer ProcMacro or MultiModifier since they are more flexible.
532
- MultiDecorator ( Box < MultiItemDecorator > ) ,
532
+ MultiDecorator ( Box < MultiItemDecorator + sync :: Sync + sync :: Send > ) ,
533
533
534
534
/// A syntax extension that is attached to an item and modifies it
535
535
/// in-place. Also allows decoration, i.e., creating new items.
536
- MultiModifier ( Box < MultiItemModifier > ) ,
536
+ MultiModifier ( Box < MultiItemModifier + sync :: Sync + sync :: Send > ) ,
537
537
538
538
/// A function-like procedural macro. TokenStream -> TokenStream.
539
- ProcMacro ( Box < ProcMacro > ) ,
539
+ ProcMacro ( Box < ProcMacro + sync :: Sync + sync :: Send > ) ,
540
540
541
541
/// An attribute-like procedural macro. TokenStream, TokenStream -> TokenStream.
542
542
/// The first TokenSteam is the attribute, the second is the annotated item.
543
543
/// Allows modification of the input items and adding new items, similar to
544
544
/// MultiModifier, but uses TokenStreams, rather than AST nodes.
545
- AttrProcMacro ( Box < AttrProcMacro > ) ,
545
+ AttrProcMacro ( Box < AttrProcMacro + sync :: Sync + sync :: Send > ) ,
546
546
547
547
/// A normal, function-like syntax extension.
548
548
///
549
549
/// `bytes!` is a `NormalTT`.
550
550
NormalTT {
551
- expander : Box < TTMacroExpander > ,
551
+ expander : Box < TTMacroExpander + sync :: Sync + sync :: Send > ,
552
552
def_info : Option < ( ast:: NodeId , Span ) > ,
553
553
/// Whether the contents of the macro can
554
554
/// directly use `#[unstable]` things (true == yes).
@@ -563,21 +563,23 @@ pub enum SyntaxExtension {
563
563
/// A function-like syntax extension that has an extra ident before
564
564
/// the block.
565
565
///
566
- IdentTT ( Box < IdentMacroExpander > , Option < Span > , bool ) ,
566
+ IdentTT ( Box < IdentMacroExpander + sync :: Sync + sync :: Send > , Option < Span > , bool ) ,
567
567
568
568
/// An attribute-like procedural macro. TokenStream -> TokenStream.
569
569
/// The input is the annotated item.
570
570
/// Allows generating code to implement a Trait for a given struct
571
571
/// 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 */ ) ,
573
575
574
576
/// An attribute-like procedural macro that derives a builtin trait.
575
577
BuiltinDerive ( BuiltinDeriveFn ) ,
576
578
577
579
/// A declarative macro, e.g. `macro m() {}`.
578
580
///
579
581
/// 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 ) > ) ,
581
583
}
582
584
583
585
impl SyntaxExtension {
0 commit comments