]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_span/src/lib.rs
Auto merge of #84762 - cjgillot:resolve-span-opt, r=petrochenkov
[rust.git] / compiler / rustc_span / src / lib.rs
index 2181c090027b535819aec1eb8afeb1851c0f4841..bee4b0a2332b55022ef570f0a6cb102b93de9b92 100644 (file)
@@ -796,6 +796,9 @@ pub fn macro_backtrace(mut self) -> impl Iterator<Item = ExpnData> {
 
     /// 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