File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -762,10 +762,10 @@ impl Span {
762
762
Some ( self )
763
763
}
764
764
765
- /// Recursively walk down the expansion ancestors to find the oldest ancestor span with the same
766
- /// [`SyntaxContext`] the initial span.
765
+ /// Recursively walk up the expansion ancestors to find the oldest ancestor span with the same
766
+ /// [`SyntaxContext`] as the initial span.
767
767
///
768
- /// This method is suitable for peeling through *local* macro expansions to find the "innermost "
768
+ /// This method is suitable for peeling through *local* macro expansions to find the "outermost "
769
769
/// span that is still local and shares the same [`SyntaxContext`]. For example, given
770
770
///
771
771
/// ```ignore (illustrative example, contains type error)
@@ -787,8 +787,8 @@ impl Span {
787
787
/// }
788
788
/// ```
789
789
///
790
- /// if provided the initial span of `outer!( x)` inside `bar` , this method will recurse
791
- /// the parent callsites until we reach `format!("error: {}", $x) `, at which point it is the
790
+ /// if provided the initial span of `format!("error: {}", $ x)` inside the expansion , this method will recurse
791
+ /// up the parent callsites until we reach `outer!(x)` in `bar `, at which point it is the
792
792
/// oldest ancestor span that is both still local and shares the same [`SyntaxContext`] as the
793
793
/// initial span.
794
794
pub fn find_oldest_ancestor_in_same_ctxt ( self ) -> Span {
You can’t perform that action at this time.
0 commit comments