Skip to content

Commit 60f7f06

Browse files
committed
Auto merge of #12462 - CBSpeir:clippy-book-typo, r=flip1995
Fix typo in section '6.10. Macro Expansions' of the Clippy Book Under the "Span.ctxt method" heading in *Section 6.10. Macro Expansions* of the *Clippy Book*, the type returned by the `Span::ctxt` method is listed as `SpanContext`. The correct type name should be `SyntaxContext`. --- changelog: Fixed typo in "Section 6.10. Macro Expansions" of the Clippy Book. `SpanContext` changed to `SyntaxContext`.
2 parents e22ca03 + d66a0ec commit 60f7f06

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

book/src/development/macro_expansions.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ if expr.span.from_expansion() {
5252

5353
### `Span.ctxt` method
5454

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

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

0 commit comments

Comments
 (0)