File tree 4 files changed +9
-8
lines changed
4 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ default = ["proc-macro"]
36
36
# of a token.
37
37
span-locations = []
38
38
39
+ # Span::mixed_site, Span::resolved_at, and Span::located_at. Requires rustc 1.45+
39
40
hygiene = []
40
41
41
42
# This feature no longer means anything.
Original file line number Diff line number Diff line change @@ -384,15 +384,15 @@ impl Span {
384
384
Span :: call_site ( )
385
385
}
386
386
387
- #[ cfg( procmacro2_semver_exempt ) ]
387
+ #[ cfg( hygiene ) ]
388
388
pub fn resolved_at ( & self , _other : Span ) -> Span {
389
389
// Stable spans consist only of line/column information, so
390
390
// `resolved_at` and `located_at` only select which span the
391
391
// caller wants line/column information from.
392
392
* self
393
393
}
394
394
395
- #[ cfg( procmacro2_semver_exempt ) ]
395
+ #[ cfg( hygiene ) ]
396
396
pub fn located_at ( & self , other : Span ) -> Span {
397
397
other
398
398
}
Original file line number Diff line number Diff line change @@ -371,17 +371,17 @@ impl Span {
371
371
/// Creates a new span with the same line/column information as `self` but
372
372
/// that resolves symbols as though it were at `other`.
373
373
///
374
- /// This method is semver exempt and not exposed by default .
375
- #[ cfg( procmacro2_semver_exempt ) ]
374
+ /// This method requires the `"hygiene"` feature to be enabled .
375
+ #[ cfg( hygiene ) ]
376
376
pub fn resolved_at ( & self , other : Span ) -> Span {
377
377
Span :: _new ( self . inner . resolved_at ( other. inner ) )
378
378
}
379
379
380
380
/// Creates a new span with the same name resolution behavior as `self` but
381
381
/// with the line/column information of `other`.
382
382
///
383
- /// This method is semver exempt and not exposed by default .
384
- #[ cfg( procmacro2_semver_exempt ) ]
383
+ /// This method requires the `"hygiene"` feature to be enabled .
384
+ #[ cfg( hygiene ) ]
385
385
pub fn located_at ( & self , other : Span ) -> Span {
386
386
Span :: _new ( self . inner . located_at ( other. inner ) )
387
387
}
Original file line number Diff line number Diff line change @@ -394,7 +394,7 @@ impl Span {
394
394
}
395
395
}
396
396
397
- #[ cfg( super_unstable ) ]
397
+ #[ cfg( hygiene ) ]
398
398
pub fn resolved_at ( & self , other : Span ) -> Span {
399
399
match ( self , other) {
400
400
( Span :: Compiler ( a) , Span :: Compiler ( b) ) => Span :: Compiler ( a. resolved_at ( b) ) ,
@@ -403,7 +403,7 @@ impl Span {
403
403
}
404
404
}
405
405
406
- #[ cfg( super_unstable ) ]
406
+ #[ cfg( hygiene ) ]
407
407
pub fn located_at ( & self , other : Span ) -> Span {
408
408
match ( self , other) {
409
409
( Span :: Compiler ( a) , Span :: Compiler ( b) ) => Span :: Compiler ( a. located_at ( b) ) ,
You can’t perform that action at this time.
0 commit comments