@@ -348,6 +348,16 @@ impl Span {
348
348
Span :: _new ( imp:: Span :: call_site ( ) )
349
349
}
350
350
351
+ /// The span located at the invocation of the procedural macro, but with
352
+ /// local variables, labels, and `$crate` resolved at the definition site
353
+ /// of the macro. This is the same hygiene behavior as `macro_rules`.
354
+ ///
355
+ /// This function requires Rust 1.45 or later.
356
+ #[ cfg( hygiene) ]
357
+ pub fn mixed_site ( ) -> Span {
358
+ Span :: _new ( imp:: Span :: mixed_site ( ) )
359
+ }
360
+
351
361
/// A span that resolves at the macro definition site.
352
362
///
353
363
/// This method is semver exempt and not exposed by default.
@@ -358,18 +368,12 @@ impl Span {
358
368
359
369
/// Creates a new span with the same line/column information as `self` but
360
370
/// that resolves symbols as though it were at `other`.
361
- ///
362
- /// This method is semver exempt and not exposed by default.
363
- #[ cfg( procmacro2_semver_exempt) ]
364
371
pub fn resolved_at ( & self , other : Span ) -> Span {
365
372
Span :: _new ( self . inner . resolved_at ( other. inner ) )
366
373
}
367
374
368
375
/// Creates a new span with the same name resolution behavior as `self` but
369
376
/// with the line/column information of `other`.
370
- ///
371
- /// This method is semver exempt and not exposed by default.
372
- #[ cfg( procmacro2_semver_exempt) ]
373
377
pub fn located_at ( & self , other : Span ) -> Span {
374
378
Span :: _new ( self . inner . located_at ( other. inner ) )
375
379
}
0 commit comments