File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ use crate::marker::{ProcMacroAutoTraits, MARKER};
77use crate :: Span ;
88use core:: fmt:: { self , Debug } ;
99
10+ #[ cfg( span_locations) ]
11+ #[ cfg_attr( doc_cfg, doc( cfg( feature = "span-locations" ) ) ) ]
12+ pub use crate :: imp:: invalidate_current_thread_spans;
13+
1014/// An object that holds a [`Group`]'s `span_open()` and `span_close()` together
1115/// in a more compact representation than holding those 2 spans individually.
1216///
Original file line number Diff line number Diff line change @@ -171,10 +171,6 @@ use std::error::Error;
171171#[ cfg( procmacro2_semver_exempt) ]
172172use std:: path:: PathBuf ;
173173
174- #[ cfg( span_locations) ]
175- #[ cfg_attr( doc_cfg, doc( cfg( feature = "span-locations" ) ) ) ]
176- pub use crate :: imp:: invalidate_current_thread_spans;
177-
178174#[ cfg( span_locations) ]
179175#[ cfg_attr( doc_cfg, doc( cfg( feature = "span-locations" ) ) ) ]
180176pub use crate :: location:: LineColumn ;
Original file line number Diff line number Diff line change @@ -950,7 +950,7 @@ impl Debug for Literal {
950950pub fn invalidate_current_thread_spans ( ) {
951951 if inside_proc_macro ( ) {
952952 panic ! (
953- "proc_macro2::invalidate_current_thread_spans is not available in procedural macros"
953+ "proc_macro2::extra:: invalidate_current_thread_spans is not available in procedural macros"
954954 ) ;
955955 } else {
956956 crate :: fallback:: invalidate_current_thread_spans ( ) ;
Original file line number Diff line number Diff line change @@ -775,7 +775,7 @@ fn test_invalidate_current_thread_spans() {
775775 let actual = format ! ( "{:#?}" , create_span( ) ) ;
776776 assert_eq ! ( actual, "bytes(3..4)" ) ;
777777
778- proc_macro2:: invalidate_current_thread_spans ( ) ;
778+ proc_macro2:: extra :: invalidate_current_thread_spans ( ) ;
779779
780780 let actual = format ! ( "{:#?}" , create_span( ) ) ;
781781 // Test that span offsets have been reset after the call
@@ -789,7 +789,7 @@ fn test_invalidate_current_thread_spans() {
789789fn test_use_span_after_invalidation ( ) {
790790 let span = create_span ( ) ;
791791
792- proc_macro2:: invalidate_current_thread_spans ( ) ;
792+ proc_macro2:: extra :: invalidate_current_thread_spans ( ) ;
793793
794794 span. source_text ( ) ;
795795}
You can’t perform that action at this time.
0 commit comments