File tree 1 file changed +19
-1
lines changed
1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -544,6 +544,12 @@ impl Span {
544
544
}
545
545
546
546
/// Returns a `Span` that would enclose both `self` and `end`.
547
+ ///
548
+ /// ```text
549
+ /// ____ ___
550
+ /// self lorem ipsum end
551
+ /// ^^^^^^^^^^^^^^^^^^^^
552
+ /// ```
547
553
pub fn to ( self , end : Span ) -> Span {
548
554
let span_data = self . data ( ) ;
549
555
let end_data = end. data ( ) ;
@@ -567,6 +573,12 @@ impl Span {
567
573
}
568
574
569
575
/// Returns a `Span` between the end of `self` to the beginning of `end`.
576
+ ///
577
+ /// ```text
578
+ /// ____ ___
579
+ /// self lorem ipsum end
580
+ /// ^^^^^^^^^^^^^
581
+ /// ```
570
582
pub fn between ( self , end : Span ) -> Span {
571
583
let span = self . data ( ) ;
572
584
let end = end. data ( ) ;
@@ -577,7 +589,13 @@ impl Span {
577
589
)
578
590
}
579
591
580
- /// Returns a `Span` between the beginning of `self` to the beginning of `end`.
592
+ /// Returns a `Span` from the beginning of `self` until the beginning of `end`.
593
+ ///
594
+ /// ```text
595
+ /// ____ ___
596
+ /// self lorem ipsum end
597
+ /// ^^^^^^^^^^^^^^^^^
598
+ /// ```
581
599
pub fn until ( self , end : Span ) -> Span {
582
600
let span = self . data ( ) ;
583
601
let end = end. data ( ) ;
You can’t perform that action at this time.
0 commit comments