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 {
762762 Some ( self )
763763 }
764764
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.
767767 ///
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 "
769769 /// span that is still local and shares the same [`SyntaxContext`]. For example, given
770770 ///
771771 /// ```ignore (illustrative example, contains type error)
@@ -787,8 +787,8 @@ impl Span {
787787 /// }
788788 /// ```
789789 ///
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
792792 /// oldest ancestor span that is both still local and shares the same [`SyntaxContext`] as the
793793 /// initial span.
794794 pub fn find_oldest_ancestor_in_same_ctxt ( self ) -> Span {
You can’t perform that action at this time.
0 commit comments