File tree 3 files changed +9
-0
lines changed
3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -374,6 +374,7 @@ impl Span {
374
374
Span { lo : 0 , hi : 0 }
375
375
}
376
376
377
+ #[ cfg( procmacro2_semver_exempt) ]
377
378
#[ cfg( hygiene) ]
378
379
pub fn mixed_site ( ) -> Span {
379
380
Span :: call_site ( )
@@ -384,13 +385,15 @@ impl Span {
384
385
Span :: call_site ( )
385
386
}
386
387
388
+ #[ cfg( procmacro2_semver_exempt) ]
387
389
pub fn resolved_at ( & self , _other : Span ) -> Span {
388
390
// Stable spans consist only of line/column information, so
389
391
// `resolved_at` and `located_at` only select which span the
390
392
// caller wants line/column information from.
391
393
* self
392
394
}
393
395
396
+ #[ cfg( procmacro2_semver_exempt) ]
394
397
pub fn located_at ( & self , other : Span ) -> Span {
395
398
other
396
399
}
Original file line number Diff line number Diff line change @@ -353,6 +353,7 @@ impl Span {
353
353
/// of the macro. This is the same hygiene behavior as `macro_rules`.
354
354
///
355
355
/// This function requires Rust 1.45 or later.
356
+ #[ cfg( procmacro2_semver_exempt) ]
356
357
#[ cfg( hygiene) ]
357
358
pub fn mixed_site ( ) -> Span {
358
359
Span :: _new ( imp:: Span :: mixed_site ( ) )
@@ -368,12 +369,14 @@ impl Span {
368
369
369
370
/// Creates a new span with the same line/column information as `self` but
370
371
/// that resolves symbols as though it were at `other`.
372
+ #[ cfg( procmacro2_semver_exempt) ]
371
373
pub fn resolved_at ( & self , other : Span ) -> Span {
372
374
Span :: _new ( self . inner . resolved_at ( other. inner ) )
373
375
}
374
376
375
377
/// Creates a new span with the same name resolution behavior as `self` but
376
378
/// with the line/column information of `other`.
379
+ #[ cfg( procmacro2_semver_exempt) ]
377
380
pub fn located_at ( & self , other : Span ) -> Span {
378
381
Span :: _new ( self . inner . located_at ( other. inner ) )
379
382
}
Original file line number Diff line number Diff line change @@ -376,6 +376,7 @@ impl Span {
376
376
}
377
377
}
378
378
379
+ #[ cfg( procmacro2_semver_exempt) ]
379
380
#[ cfg( hygiene) ]
380
381
pub fn mixed_site ( ) -> Span {
381
382
if inside_proc_macro ( ) {
@@ -394,6 +395,7 @@ impl Span {
394
395
}
395
396
}
396
397
398
+ #[ cfg( procmacro2_semver_exempt) ]
397
399
pub fn resolved_at ( & self , other : Span ) -> Span {
398
400
match ( self , other) {
399
401
#[ cfg( hygiene) ]
@@ -408,6 +410,7 @@ impl Span {
408
410
}
409
411
}
410
412
413
+ #[ cfg( procmacro2_semver_exempt) ]
411
414
pub fn located_at ( & self , other : Span ) -> Span {
412
415
match ( self , other) {
413
416
#[ cfg( hygiene) ]
You can’t perform that action at this time.
0 commit comments