Skip to content

Commit

Permalink
Fix typo in section '6.10. Macro Expansions' of the Clippy Book
Browse files Browse the repository at this point in the history
The struct returned by the `Span::ctxt` method was listed as
`SpanContext`. The correct struct is currently named `SyntaxContext`.
  • Loading branch information
CBSpeir committed Mar 11, 2024
1 parent 870e016 commit d66a0ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions book/src/development/macro_expansions.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if expr.span.from_expansion() {

### `Span.ctxt` method

The `span`'s context, given by the method [`ctxt`] and returning [SpanContext],
The `span`'s context, given by the method [`ctxt`] and returning [SyntaxContext],
represents if the span is from a macro expansion and, if it is, which
macro call expanded this span.

Expand Down Expand Up @@ -155,4 +155,4 @@ if in_external_macro(cx.sess(), foo_span) {
[`from_expansion`]: https://doc.rust-lang.org/stable/nightly-rustc/rustc_span/struct.Span.html#method.from_expansion
[`in_external_macro`]: https://doc.rust-lang.org/stable/nightly-rustc/rustc_middle/lint/fn.in_external_macro.html
[Span]: https://doc.rust-lang.org/stable/nightly-rustc/rustc_span/struct.Span.html
[SpanContext]: https://doc.rust-lang.org/stable/nightly-rustc/rustc_span/hygiene/struct.SyntaxContext.html
[SyntaxContext]: https://doc.rust-lang.org/stable/nightly-rustc/rustc_span/hygiene/struct.SyntaxContext.html

0 comments on commit d66a0ec

Please sign in to comment.