document that Span::to
can go backwards
This commit is contained in:
parent
94d6245003
commit
83e653920d
1 changed files with 3 additions and 0 deletions
|
@ -796,6 +796,9 @@ impl Span {
|
|||
|
||||
/// Returns a `Span` that would enclose both `self` and `end`.
|
||||
///
|
||||
/// Note that this can also be used to extend the span "backwards":
|
||||
/// `start.to(end)` and `end.to(start)` return the same `Span`.
|
||||
///
|
||||
/// ```text
|
||||
/// ____ ___
|
||||
/// self lorem ipsum end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue