about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristopher B. Speir <chris@cbspeir.dev>2024-03-11 13:25:44 -0500
committerChristopher B. Speir <chris@cbspeir.dev>2024-03-11 13:31:02 -0500
commitd66a0ec714023101bc1e8ef63231979df20e2318 (patch)
tree336b78f2181ebd4ee10a736584c0f4e119a1ec71
parent870e016b65465747b63018f1b14be13a5b09791a (diff)
downloadrust-d66a0ec714023101bc1e8ef63231979df20e2318.tar.gz
rust-d66a0ec714023101bc1e8ef63231979df20e2318.zip
Fix typo in section '6.10. Macro Expansions' of the Clippy Book
The struct returned by the `Span::ctxt` method was listed as
`SpanContext`. The correct struct is currently named `SyntaxContext`.
-rw-r--r--book/src/development/macro_expansions.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/book/src/development/macro_expansions.md b/book/src/development/macro_expansions.md
index aecca9ef72e..125b6c4bc5b 100644
--- a/book/src/development/macro_expansions.md
+++ b/book/src/development/macro_expansions.md
@@ -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.
 
@@ -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