- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Parse unnamed fields and anonymous structs or unions #115732
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
Parse unnamed fields and anonymous structs or unions #115732
Conversation
| Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt Changes to the size of AST and/or HIR nodes. cc @nnethercote | 
9200038    to
    36df386      
    Compare
  
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
36df386    to
    e997b2a      
    Compare
  
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
e997b2a    to
    1320961      
    Compare
  
    | Some changes occurred in src/tools/clippy cc @rust-lang/clippy | 
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
1320961    to
    a05f6d3      
    Compare
  
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
| This PR implements two independent changes 
 Could you keep only the first part in this PR? | 
a05f6d3    to
    05c68b4      
    Compare
  
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
05c68b4    to
    7d3ee85      
    Compare
  
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
      
        
              This comment was marked as resolved.
        
        
      
    
  This comment was marked as resolved.
7d3ee85    to
    9b79d4f      
    Compare
  
    | @frank-king | 
9b79d4f    to
    353d71f      
    Compare
  
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
      
        
              This comment was marked as resolved.
        
        
      
    
  This comment was marked as resolved.
353d71f    to
    ec5eed9      
    Compare
  
    | Some changes occurred in src/tools/cargo cc @ehuss | 
ec5eed9    to
    6da4302      
    Compare
  
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
6da4302    to
    f711b6b      
    Compare
  
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
f711b6b    to
    6670134      
    Compare
  
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
6670134    to
    8dc10f3      
    Compare
  
    | @rustbot ready | 
      
        
              This comment was marked as resolved.
        
        
      
    
  This comment was marked as resolved.
Anonymous structs or unions are parsed as a special type of field, instead of a gerenal kind of `Ty`.
8dc10f3    to
    2f6a16d      
    Compare
  
    | I wonder if this refactoring (special kind of field, instead of a type) is an improvement at all, if the resulting diff is +416 −158. | 
| The problem is that, since  The current approach (before this PR) requires more efforts on parsing anonymous structs or unions as a special  | 
| Yeah, I'm not convinced such refactoring is an improvement. Work on RFC 2102 needs to rather focus on implementing the feature further in middle end and code generation. I'm going to close this in meantime. | 
| Well, I'll then continue to work on #115367 | 
This PR implements #49804, and parses the anonymous structs or unions as a special type of field, instead of a general kind of
Ty.r? @petrochenkov