- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Some hygiene doc improvements #146159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some hygiene doc improvements #146159
Conversation
13d7600    to
    719ecd4      
    Compare
  
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
719ecd4    to
    0dc3517      
    Compare
  
    0dc3517    to
    07cb420      
    Compare
  
    | There's a couple things I'm still unclear on if you don't mind explaining. In the dev guide section on "The Call-site Hierarchy", it says 
 But I did some testing and I think  If I'm right about the above, is the call-site and the expansion-order hierarchies actually different? I can't think of an example where they would diverge. I noticed when we mark spans for desugaring, we just use the root  | 
| 
 Yes,  
 Yeah, there's a mistake there, it should be  
 Yes, they are different, and the example is supposed to demonstrate exactly that. 
 Using the root  | 
07cb420    to
    31b3915      
    Compare
  
    | /// 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> { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This name is a bit unfortunate since it does not use ExpnData::parent.
| @rustbot ready | 
| 
 I did some more testing and it seems the SyntaxContext for a Path depends on where the referenced thing is defined...which makes a lot of sense. Anyways, I think I've done enough damage here for now. I really appreciate your help with this. | 
| @bors r+ rollup | 
Rollup of 8 pull requests Successful merges: - #113095 (Document `become` keyword) - #146159 (Some hygiene doc improvements) - #146171 (tidy: check that error messages don't start with a capitalized letter) - #146419 (Update the arm-* and aarch64-* platform docs.) - #146473 (Revert "Constify SystemTime methods") - #146506 (Fix small typo in check-cfg.md) - #146517 (fix Condvar::wait_timeout docs) - #146521 (document `core::ffi::VaArgSafe`) r? `@ghost` `@rustbot` modify labels: rollup
Improve some doc comments around SyntaxContext, outer_expn and friends.
Based on discussion at #146100.
r? petrochenkov