@@ -9,7 +9,7 @@ use std::str::FromStr;
99use crate :: { fallback, Delimiter , Punct , Spacing , TokenTree } ;
1010
1111#[ derive( Clone ) ]
12- pub enum TokenStream {
12+ pub ( crate ) enum TokenStream {
1313 Compiler ( DeferredTokenStream ) ,
1414 Fallback ( fallback:: TokenStream ) ,
1515}
@@ -19,12 +19,12 @@ pub enum TokenStream {
1919// we hold on to the appended tokens and do proc_macro::TokenStream::extend as
2020// late as possible to batch together consecutive uses of the Extend impl.
2121#[ derive( Clone ) ]
22- pub struct DeferredTokenStream {
22+ pub ( crate ) struct DeferredTokenStream {
2323 stream : proc_macro:: TokenStream ,
2424 extra : Vec < proc_macro:: TokenTree > ,
2525}
2626
27- pub enum LexError {
27+ pub ( crate ) enum LexError {
2828 Compiler ( proc_macro:: LexError ) ,
2929 Fallback ( fallback:: LexError ) ,
3030}
@@ -316,7 +316,7 @@ impl fmt::Debug for LexError {
316316}
317317
318318#[ derive( Clone ) ]
319- pub enum TokenTreeIter {
319+ pub ( crate ) enum TokenTreeIter {
320320 Compiler ( proc_macro:: token_stream:: IntoIter ) ,
321321 Fallback ( fallback:: TokenTreeIter ) ,
322322}
@@ -375,7 +375,7 @@ impl fmt::Debug for TokenTreeIter {
375375
376376#[ derive( Clone , PartialEq , Eq ) ]
377377#[ cfg( super_unstable) ]
378- pub enum SourceFile {
378+ pub ( crate ) enum SourceFile {
379379 Compiler ( proc_macro:: SourceFile ) ,
380380 Fallback ( fallback:: SourceFile ) ,
381381}
@@ -413,13 +413,13 @@ impl fmt::Debug for SourceFile {
413413}
414414
415415#[ cfg( any( super_unstable, feature = "span-locations" ) ) ]
416- pub struct LineColumn {
416+ pub ( crate ) struct LineColumn {
417417 pub line : usize ,
418418 pub column : usize ,
419419}
420420
421421#[ derive( Copy , Clone ) ]
422- pub enum Span {
422+ pub ( crate ) enum Span {
423423 Compiler ( proc_macro:: Span ) ,
424424 Fallback ( fallback:: Span ) ,
425425}
@@ -557,7 +557,7 @@ impl fmt::Debug for Span {
557557 }
558558}
559559
560- pub fn debug_span_field_if_nontrivial ( debug : & mut fmt:: DebugStruct , span : Span ) {
560+ pub ( crate ) fn debug_span_field_if_nontrivial ( debug : & mut fmt:: DebugStruct , span : Span ) {
561561 match span {
562562 Span :: Compiler ( s) => {
563563 debug. field ( "span" , & s) ;
@@ -567,7 +567,7 @@ pub fn debug_span_field_if_nontrivial(debug: &mut fmt::DebugStruct, span: Span)
567567}
568568
569569#[ derive( Clone ) ]
570- pub enum Group {
570+ pub ( crate ) enum Group {
571571 Compiler ( proc_macro:: Group ) ,
572572 Fallback ( fallback:: Group ) ,
573573}
@@ -677,7 +677,7 @@ impl fmt::Debug for Group {
677677}
678678
679679#[ derive( Clone ) ]
680- pub enum Ident {
680+ pub ( crate ) enum Ident {
681681 Compiler ( proc_macro:: Ident ) ,
682682 Fallback ( fallback:: Ident ) ,
683683}
@@ -772,7 +772,7 @@ impl fmt::Debug for Ident {
772772}
773773
774774#[ derive( Clone ) ]
775- pub enum Literal {
775+ pub ( crate ) enum Literal {
776776 Compiler ( proc_macro:: Literal ) ,
777777 Fallback ( fallback:: Literal ) ,
778778}
0 commit comments