@@ -43,7 +43,6 @@ mod diagnostic;
43
43
#[ unstable( feature = "proc_macro_diagnostic" , issue = "54140" ) ]
44
44
pub use diagnostic:: { Diagnostic , Level , MultiSpan } ;
45
45
46
- use std:: cmp:: Ordering ;
47
46
use std:: ops:: { Range , RangeBounds } ;
48
47
use std:: path:: PathBuf ;
49
48
use std:: str:: FromStr ;
@@ -494,18 +493,6 @@ impl Span {
494
493
self . 0 . byte_range ( )
495
494
}
496
495
497
- /// Gets the starting line/column in the source file for this span.
498
- #[ unstable( feature = "proc_macro_span" , issue = "54725" ) ]
499
- pub fn start ( & self ) -> LineColumn {
500
- self . 0 . start ( ) . add_1_to_column ( )
501
- }
502
-
503
- /// Gets the ending line/column in the source file for this span.
504
- #[ unstable( feature = "proc_macro_span" , issue = "54725" ) ]
505
- pub fn end ( & self ) -> LineColumn {
506
- self . 0 . end ( ) . add_1_to_column ( )
507
- }
508
-
509
496
/// Creates an empty span pointing to directly before this span.
510
497
#[ unstable( feature = "proc_macro_span_shrink" , issue = "87552" ) ]
511
498
pub fn before ( & self ) -> Span {
@@ -586,44 +573,6 @@ impl fmt::Debug for Span {
586
573
}
587
574
}
588
575
589
- /// A line-column pair representing the start or end of a `Span`.
590
- #[ unstable( feature = "proc_macro_span" , issue = "54725" ) ]
591
- #[ derive( Copy , Clone , Debug , PartialEq , Eq , Hash ) ]
592
- pub struct LineColumn {
593
- /// The 1-indexed line in the source file on which the span starts or ends (inclusive).
594
- #[ unstable( feature = "proc_macro_span" , issue = "54725" ) ]
595
- pub line : usize ,
596
- /// The 1-indexed column (number of bytes in UTF-8 encoding) in the source
597
- /// file on which the span starts or ends (inclusive).
598
- #[ unstable( feature = "proc_macro_span" , issue = "54725" ) ]
599
- pub column : usize ,
600
- }
601
-
602
- impl LineColumn {
603
- fn add_1_to_column ( self ) -> Self {
604
- LineColumn { line : self . line , column : self . column + 1 }
605
- }
606
- }
607
-
608
- #[ unstable( feature = "proc_macro_span" , issue = "54725" ) ]
609
- impl !Send for LineColumn { }
610
- #[ unstable( feature = "proc_macro_span" , issue = "54725" ) ]
611
- impl !Sync for LineColumn { }
612
-
613
- #[ unstable( feature = "proc_macro_span" , issue = "54725" ) ]
614
- impl Ord for LineColumn {
615
- fn cmp ( & self , other : & Self ) -> Ordering {
616
- self . line . cmp ( & other. line ) . then ( self . column . cmp ( & other. column ) )
617
- }
618
- }
619
-
620
- #[ unstable( feature = "proc_macro_span" , issue = "54725" ) ]
621
- impl PartialOrd for LineColumn {
622
- fn partial_cmp ( & self , other : & Self ) -> Option < Ordering > {
623
- Some ( self . cmp ( other) )
624
- }
625
- }
626
-
627
576
/// The source file of a given `Span`.
628
577
#[ unstable( feature = "proc_macro_span" , issue = "54725" ) ]
629
578
#[ derive( Clone ) ]
0 commit comments