@@ -74,13 +74,23 @@ use syntax_pos::hygiene::Mark;
74
74
#[ derive( Clone ) ]
75
75
pub struct TokenStream ( tokenstream:: TokenStream ) ;
76
76
77
+ #[ unstable( feature = "proc_macro" , issue = "38356" ) ]
78
+ impl !Send for TokenStream { }
79
+ #[ unstable( feature = "proc_macro" , issue = "38356" ) ]
80
+ impl !Sync for TokenStream { }
81
+
77
82
/// Error returned from `TokenStream::from_str`.
78
83
#[ stable( feature = "proc_macro_lib" , since = "1.15.0" ) ]
79
84
#[ derive( Debug ) ]
80
85
pub struct LexError {
81
86
_inner : ( ) ,
82
87
}
83
88
89
+ #[ unstable( feature = "proc_macro" , issue = "38356" ) ]
90
+ impl !Send for LexError { }
91
+ #[ unstable( feature = "proc_macro" , issue = "38356" ) ]
92
+ impl !Sync for LexError { }
93
+
84
94
impl TokenStream {
85
95
/// Returns an empty `TokenStream`.
86
96
#[ unstable( feature = "proc_macro" , issue = "38356" ) ]
@@ -231,6 +241,11 @@ pub fn quote_span(span: Span) -> TokenStream {
231
241
#[ derive( Copy , Clone ) ]
232
242
pub struct Span ( syntax_pos:: Span ) ;
233
243
244
+ #[ unstable( feature = "proc_macro" , issue = "38356" ) ]
245
+ impl !Send for Span { }
246
+ #[ unstable( feature = "proc_macro" , issue = "38356" ) ]
247
+ impl !Sync for Span { }
248
+
234
249
macro_rules! diagnostic_method {
235
250
( $name: ident, $level: expr) => (
236
251
/// Create a new `Diagnostic` with the given `message` at the span
@@ -363,6 +378,11 @@ pub struct LineColumn {
363
378
pub column : usize
364
379
}
365
380
381
+ #[ unstable( feature = "proc_macro" , issue = "38356" ) ]
382
+ impl !Send for LineColumn { }
383
+ #[ unstable( feature = "proc_macro" , issue = "38356" ) ]
384
+ impl !Sync for LineColumn { }
385
+
366
386
/// The source file of a given `Span`.
367
387
#[ unstable( feature = "proc_macro" , issue = "38356" ) ]
368
388
#[ derive( Clone ) ]
@@ -393,7 +413,7 @@ impl SourceFile {
393
413
394
414
/// Returns `true` if this source file is a real source file, and not generated by an external
395
415
/// macro's expansion.
396
- # [ unstable( feature = "proc_macro" , issue = "38356" ) ]
416
+ #[ unstable( feature = "proc_macro" , issue = "38356" ) ]
397
417
pub fn is_real ( & self ) -> bool {
398
418
// This is a hack until intercrate spans are implemented and we can have real source files
399
419
// for spans generated in external macros.
@@ -450,6 +470,11 @@ pub enum TokenTree {
450
470
Literal ( Literal ) ,
451
471
}
452
472
473
+ #[ unstable( feature = "proc_macro" , issue = "38356" ) ]
474
+ impl !Send for TokenTree { }
475
+ #[ unstable( feature = "proc_macro" , issue = "38356" ) ]
476
+ impl !Sync for TokenTree { }
477
+
453
478
impl TokenTree {
454
479
/// Returns the span of this token, accessing the `span` method of each of
455
480
/// the internal tokens.
@@ -546,6 +571,11 @@ pub struct Group {
546
571
span : Span ,
547
572
}
548
573
574
+ #[ unstable( feature = "proc_macro" , issue = "38356" ) ]
575
+ impl !Send for Group { }
576
+ #[ unstable( feature = "proc_macro" , issue = "38356" ) ]
577
+ impl !Sync for Group { }
578
+
549
579
/// Describes how a sequence of token trees is delimited.
550
580
#[ derive( Copy , Clone , Debug , PartialEq , Eq ) ]
551
581
#[ unstable( feature = "proc_macro" , issue = "38356" ) ]
@@ -628,6 +658,11 @@ pub struct Op {
628
658
span : Span ,
629
659
}
630
660
661
+ #[ unstable( feature = "proc_macro" , issue = "38356" ) ]
662
+ impl !Send for Op { }
663
+ #[ unstable( feature = "proc_macro" , issue = "38356" ) ]
664
+ impl !Sync for Op { }
665
+
631
666
/// Whether an `Op` is either followed immediately by another `Op` or followed by whitespace.
632
667
#[ derive( Copy , Clone , Debug , PartialEq , Eq ) ]
633
668
#[ unstable( feature = "proc_macro" , issue = "38356" ) ]
@@ -694,6 +729,11 @@ pub struct Term {
694
729
span : Span ,
695
730
}
696
731
732
+ #[ unstable( feature = "proc_macro" , issue = "38356" ) ]
733
+ impl !Send for Term { }
734
+ #[ unstable( feature = "proc_macro" , issue = "38356" ) ]
735
+ impl !Sync for Term { }
736
+
697
737
impl Term {
698
738
/// Creates a new `Term` with the given `string` as well as the specified
699
739
/// `span`.
@@ -752,6 +792,11 @@ pub struct Literal {
752
792
span : Span ,
753
793
}
754
794
795
+ #[ unstable( feature = "proc_macro" , issue = "38356" ) ]
796
+ impl !Send for Literal { }
797
+ #[ unstable( feature = "proc_macro" , issue = "38356" ) ]
798
+ impl !Sync for Literal { }
799
+
755
800
macro_rules! suffixed_int_literals {
756
801
( $( $name: ident => $kind: ident, ) * ) => ( $(
757
802
/// Creates a new suffixed integer literal with the specified value.
0 commit comments