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};
7
7
use crate :: Span ;
8
8
use core:: fmt:: { self , Debug } ;
9
9
10
+ #[ cfg( span_locations) ]
11
+ #[ cfg_attr( doc_cfg, doc( cfg( feature = "span-locations" ) ) ) ]
12
+ pub use crate :: imp:: invalidate_current_thread_spans;
13
+
10
14
/// An object that holds a [`Group`]'s `span_open()` and `span_close()` together
11
15
/// in a more compact representation than holding those 2 spans individually.
12
16
///
Original file line number Diff line number Diff line change @@ -171,10 +171,6 @@ use std::error::Error;
171
171
#[ cfg( procmacro2_semver_exempt) ]
172
172
use std:: path:: PathBuf ;
173
173
174
- #[ cfg( span_locations) ]
175
- #[ cfg_attr( doc_cfg, doc( cfg( feature = "span-locations" ) ) ) ]
176
- pub use crate :: imp:: invalidate_current_thread_spans;
177
-
178
174
#[ cfg( span_locations) ]
179
175
#[ cfg_attr( doc_cfg, doc( cfg( feature = "span-locations" ) ) ) ]
180
176
pub use crate :: location:: LineColumn ;
Original file line number Diff line number Diff line change @@ -950,7 +950,7 @@ impl Debug for Literal {
950
950
pub fn invalidate_current_thread_spans ( ) {
951
951
if inside_proc_macro ( ) {
952
952
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"
954
954
) ;
955
955
} else {
956
956
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() {
775
775
let actual = format ! ( "{:#?}" , create_span( ) ) ;
776
776
assert_eq ! ( actual, "bytes(3..4)" ) ;
777
777
778
- proc_macro2:: invalidate_current_thread_spans ( ) ;
778
+ proc_macro2:: extra :: invalidate_current_thread_spans ( ) ;
779
779
780
780
let actual = format ! ( "{:#?}" , create_span( ) ) ;
781
781
// Test that span offsets have been reset after the call
@@ -789,7 +789,7 @@ fn test_invalidate_current_thread_spans() {
789
789
fn test_use_span_after_invalidation ( ) {
790
790
let span = create_span ( ) ;
791
791
792
- proc_macro2:: invalidate_current_thread_spans ( ) ;
792
+ proc_macro2:: extra :: invalidate_current_thread_spans ( ) ;
793
793
794
794
span. source_text ( ) ;
795
795
}
You can’t perform that action at this time.
0 commit comments