@@ -298,7 +298,7 @@ impl Span {
298
298
}
299
299
300
300
/// The original source file into which this span points.
301
- #[ unstable( feature = "proc_macro_span" , issue = "38356 " ) ]
301
+ #[ unstable( feature = "proc_macro_span" , issue = "54725 " ) ]
302
302
pub fn source_file ( & self ) -> SourceFile {
303
303
SourceFile {
304
304
source_file : __internal:: lookup_char_pos ( self . 0 . lo ( ) ) . file ,
@@ -307,21 +307,21 @@ impl Span {
307
307
308
308
/// The `Span` for the tokens in the previous macro expansion from which
309
309
/// `self` was generated from, if any.
310
- #[ unstable( feature = "proc_macro_span" , issue = "38356 " ) ]
310
+ #[ unstable( feature = "proc_macro_span" , issue = "54725 " ) ]
311
311
pub fn parent ( & self ) -> Option < Span > {
312
312
self . 0 . parent ( ) . map ( Span )
313
313
}
314
314
315
315
/// The span for the origin source code that `self` was generated from. If
316
316
/// this `Span` wasn't generated from other macro expansions then the return
317
317
/// value is the same as `*self`.
318
- #[ unstable( feature = "proc_macro_span" , issue = "38356 " ) ]
318
+ #[ unstable( feature = "proc_macro_span" , issue = "54725 " ) ]
319
319
pub fn source ( & self ) -> Span {
320
320
Span ( self . 0 . source_callsite ( ) )
321
321
}
322
322
323
323
/// Get the starting line/column in the source file for this span.
324
- #[ unstable( feature = "proc_macro_span" , issue = "38356 " ) ]
324
+ #[ unstable( feature = "proc_macro_span" , issue = "54725 " ) ]
325
325
pub fn start ( & self ) -> LineColumn {
326
326
let loc = __internal:: lookup_char_pos ( self . 0 . lo ( ) ) ;
327
327
LineColumn {
@@ -331,7 +331,7 @@ impl Span {
331
331
}
332
332
333
333
/// Get the ending line/column in the source file for this span.
334
- #[ unstable( feature = "proc_macro_span" , issue = "38356 " ) ]
334
+ #[ unstable( feature = "proc_macro_span" , issue = "54725 " ) ]
335
335
pub fn end ( & self ) -> LineColumn {
336
336
let loc = __internal:: lookup_char_pos ( self . 0 . hi ( ) ) ;
337
337
LineColumn {
@@ -343,7 +343,7 @@ impl Span {
343
343
/// Create a new span encompassing `self` and `other`.
344
344
///
345
345
/// Returns `None` if `self` and `other` are from different files.
346
- #[ unstable( feature = "proc_macro_span" , issue = "38356 " ) ]
346
+ #[ unstable( feature = "proc_macro_span" , issue = "54725 " ) ]
347
347
pub fn join ( & self , other : Span ) -> Option < Span > {
348
348
let self_loc = __internal:: lookup_char_pos ( self . 0 . lo ( ) ) ;
349
349
let other_loc = __internal:: lookup_char_pos ( other. 0 . lo ( ) ) ;
@@ -355,20 +355,20 @@ impl Span {
355
355
356
356
/// Creates a new span with the same line/column information as `self` but
357
357
/// that resolves symbols as though it were at `other`.
358
- #[ unstable( feature = "proc_macro_span" , issue = "38356 " ) ]
358
+ #[ unstable( feature = "proc_macro_span" , issue = "54725 " ) ]
359
359
pub fn resolved_at ( & self , other : Span ) -> Span {
360
360
Span ( self . 0 . with_ctxt ( other. 0 . ctxt ( ) ) )
361
361
}
362
362
363
363
/// Creates a new span with the same name resolution behavior as `self` but
364
364
/// with the line/column information of `other`.
365
- #[ unstable( feature = "proc_macro_span" , issue = "38356 " ) ]
365
+ #[ unstable( feature = "proc_macro_span" , issue = "54725 " ) ]
366
366
pub fn located_at ( & self , other : Span ) -> Span {
367
367
other. resolved_at ( * self )
368
368
}
369
369
370
370
/// Compares to spans to see if they're equal.
371
- #[ unstable( feature = "proc_macro_span" , issue = "38356 " ) ]
371
+ #[ unstable( feature = "proc_macro_span" , issue = "54725 " ) ]
372
372
pub fn eq ( & self , other : & Span ) -> bool {
373
373
self . 0 == other. 0
374
374
}
@@ -391,33 +391,33 @@ impl fmt::Debug for Span {
391
391
}
392
392
393
393
/// A line-column pair representing the start or end of a `Span`.
394
- #[ unstable( feature = "proc_macro_span" , issue = "38356 " ) ]
394
+ #[ unstable( feature = "proc_macro_span" , issue = "54725 " ) ]
395
395
#[ derive( Copy , Clone , Debug , PartialEq , Eq ) ]
396
396
pub struct LineColumn {
397
397
/// The 1-indexed line in the source file on which the span starts or ends (inclusive).
398
- #[ unstable( feature = "proc_macro_span" , issue = "38356 " ) ]
398
+ #[ unstable( feature = "proc_macro_span" , issue = "54725 " ) ]
399
399
pub line : usize ,
400
400
/// The 0-indexed column (in UTF-8 characters) in the source file on which
401
401
/// the span starts or ends (inclusive).
402
- #[ unstable( feature = "proc_macro_span" , issue = "38356 " ) ]
402
+ #[ unstable( feature = "proc_macro_span" , issue = "54725 " ) ]
403
403
pub column : usize
404
404
}
405
405
406
- #[ unstable( feature = "proc_macro_span" , issue = "38356 " ) ]
406
+ #[ unstable( feature = "proc_macro_span" , issue = "54725 " ) ]
407
407
impl !Send for LineColumn { }
408
- #[ unstable( feature = "proc_macro_span" , issue = "38356 " ) ]
408
+ #[ unstable( feature = "proc_macro_span" , issue = "54725 " ) ]
409
409
impl !Sync for LineColumn { }
410
410
411
411
/// The source file of a given `Span`.
412
- #[ unstable( feature = "proc_macro_span" , issue = "38356 " ) ]
412
+ #[ unstable( feature = "proc_macro_span" , issue = "54725 " ) ]
413
413
#[ derive( Clone ) ]
414
414
pub struct SourceFile {
415
415
source_file : Lrc < syntax_pos:: SourceFile > ,
416
416
}
417
417
418
- #[ unstable( feature = "proc_macro_span" , issue = "38356 " ) ]
418
+ #[ unstable( feature = "proc_macro_span" , issue = "54725 " ) ]
419
419
impl !Send for SourceFile { }
420
- #[ unstable( feature = "proc_macro_span" , issue = "38356 " ) ]
420
+ #[ unstable( feature = "proc_macro_span" , issue = "54725 " ) ]
421
421
impl !Sync for SourceFile { }
422
422
423
423
impl SourceFile {
@@ -431,7 +431,7 @@ impl SourceFile {
431
431
/// the command line, the path as given may not actually be valid.
432
432
///
433
433
/// [`is_real`]: #method.is_real
434
- #[ unstable( feature = "proc_macro_span" , issue = "38356 " ) ]
434
+ #[ unstable( feature = "proc_macro_span" , issue = "54725 " ) ]
435
435
pub fn path ( & self ) -> PathBuf {
436
436
match self . source_file . name {
437
437
FileName :: Real ( ref path) => path. clone ( ) ,
@@ -441,7 +441,7 @@ impl SourceFile {
441
441
442
442
/// Returns `true` if this source file is a real source file, and not generated by an external
443
443
/// macro's expansion.
444
- #[ unstable( feature = "proc_macro_span" , issue = "38356 " ) ]
444
+ #[ unstable( feature = "proc_macro_span" , issue = "54725 " ) ]
445
445
pub fn is_real ( & self ) -> bool {
446
446
// This is a hack until intercrate spans are implemented and we can have real source files
447
447
// for spans generated in external macros.
@@ -451,7 +451,7 @@ impl SourceFile {
451
451
}
452
452
453
453
454
- #[ unstable( feature = "proc_macro_span" , issue = "38356 " ) ]
454
+ #[ unstable( feature = "proc_macro_span" , issue = "54725 " ) ]
455
455
impl fmt:: Debug for SourceFile {
456
456
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
457
457
f. debug_struct ( "SourceFile" )
@@ -461,14 +461,14 @@ impl fmt::Debug for SourceFile {
461
461
}
462
462
}
463
463
464
- #[ unstable( feature = "proc_macro_span" , issue = "38356 " ) ]
464
+ #[ unstable( feature = "proc_macro_span" , issue = "54725 " ) ]
465
465
impl PartialEq for SourceFile {
466
466
fn eq ( & self , other : & Self ) -> bool {
467
467
Lrc :: ptr_eq ( & self . source_file , & other. source_file )
468
468
}
469
469
}
470
470
471
- #[ unstable( feature = "proc_macro_span" , issue = "38356 " ) ]
471
+ #[ unstable( feature = "proc_macro_span" , issue = "54725 " ) ]
472
472
impl Eq for SourceFile { }
473
473
474
474
/// A single token or a delimited sequence of token trees (e.g. `[1, (), ..]`).
@@ -679,7 +679,7 @@ impl Group {
679
679
/// pub fn span_open(&self) -> Span {
680
680
/// ^
681
681
/// ```
682
- #[ unstable( feature = "proc_macro_span" , issue = "38356 " ) ]
682
+ #[ unstable( feature = "proc_macro_span" , issue = "54725 " ) ]
683
683
pub fn span_open ( & self ) -> Span {
684
684
Span ( self . span . open )
685
685
}
@@ -690,7 +690,7 @@ impl Group {
690
690
/// pub fn span_close(&self) -> Span {
691
691
/// ^
692
692
/// ```
693
- #[ unstable( feature = "proc_macro_span" , issue = "38356 " ) ]
693
+ #[ unstable( feature = "proc_macro_span" , issue = "54725 " ) ]
694
694
pub fn span_close ( & self ) -> Span {
695
695
Span ( self . span . close )
696
696
}
0 commit comments