about summary refs log tree commit diff
path: root/compiler/rustc_span/src/lib.rs
diff options
context:
space:
mode:
authorCameron Steffen <cam.steffen94@gmail.com>2025-09-03 07:47:32 -0500
committerCameron Steffen <cam.steffen94@gmail.com>2025-09-05 20:22:12 -0500
commit31b39150c79e77cbde2d0567120977a014c224f8 (patch)
tree41154cc33f3300fd75d045b512bb18af20ee3295 /compiler/rustc_span/src/lib.rs
parent154037ffb82714a8d6264a9153622637b170c706 (diff)
downloadrust-31b39150c79e77cbde2d0567120977a014c224f8.tar.gz
rust-31b39150c79e77cbde2d0567120977a014c224f8.zip
Some hygiene doc improvements
Diffstat (limited to 'compiler/rustc_span/src/lib.rs')
-rw-r--r--compiler/rustc_span/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs
index ae6755f0764..e95b743b1ce 100644
--- a/compiler/rustc_span/src/lib.rs
+++ b/compiler/rustc_span/src/lib.rs
@@ -710,8 +710,8 @@ impl Span {
         if !ctxt.is_root() { ctxt.outer_expn_data().call_site.source_callsite() } else { self }
     }
 
-    /// The `Span` for the tokens in the previous macro expansion from which `self` was generated,
-    /// if any.
+    /// Returns the call-site span of the last macro expansion which produced this `Span`.
+    /// (see [`ExpnData::call_site`]). Returns `None` if this is not an expansion.
     pub fn parent_callsite(self) -> Option<Span> {
         let ctxt = self.ctxt();
         (!ctxt.is_root()).then(|| ctxt.outer_expn_data().call_site)