- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Expand suggestions for type ascription parse errors #59150
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
Conversation
| r? @pnkfelix (rust_highfive has picked a reviewer for you, use r? to override) | 
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
951a9a0    to
    8d5d099      
    Compare
  
    | r? @varkor | 
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
8d5d099    to
    08b6552      
    Compare
  
    | Ping from triage @vakor: This PR requires your review. | 
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.
I still need to look over these changes in detail (I will do soon, sorry for taking so long). I've left a suggestion about making the diagnostic more concise in the meantime.
In order to minimize the verbosity of common syntax errors that are parsed as type ascription, hide the feature gate error unless there are no other errors being emitted by the parser.
b30ac46    to
    d72ef21      
    Compare
  
    | Ping | 
| @bors r+ | 
| 📌 Commit d72ef21 has been approved by  | 
Expand suggestions for type ascription parse errors Fix rust-lang#51222. CC rust-lang#48016, rust-lang#47666, rust-lang#54516, rust-lang#34255.
Expand suggestions for type ascription parse errors Fix rust-lang#51222. CC rust-lang#48016, rust-lang#47666, rust-lang#54516, rust-lang#34255.
Expand suggestions for type ascription parse errors Fix rust-lang#51222. CC rust-lang#48016, rust-lang#47666, rust-lang#54516, rust-lang#34255.
Rollup of 10 pull requests Successful merges: - #59150 (Expand suggestions for type ascription parse errors) - #59232 (Merge `Promoted` and `Static` in `mir::Place`) - #59267 (Provide suggestion when using field access instead of path) - #59315 (Add no_hash to query macro and move some queries over) - #59334 (Update build instructions in README.md) - #59362 (Demo `FromIterator` short-circuiting) - #59374 (Simplify checked_duration_since) - #59389 (replace redundant note in deprecation warning) - #59410 (Clarify `{Ord,f32,f64}::clamp` docs a little) - #59419 (Utilize `?` instead of `return None`.) Failed merges: r? @ghost
Rollup of 10 pull requests Successful merges: - #59150 (Expand suggestions for type ascription parse errors) - #59232 (Merge `Promoted` and `Static` in `mir::Place`) - #59267 (Provide suggestion when using field access instead of path) - #59315 (Add no_hash to query macro and move some queries over) - #59334 (Update build instructions in README.md) - #59362 (Demo `FromIterator` short-circuiting) - #59374 (Simplify checked_duration_since) - #59389 (replace redundant note in deprecation warning) - #59410 (Clarify `{Ord,f32,f64}::clamp` docs a little) - #59419 (Utilize `?` instead of `return None`.) Failed merges: r? @ghost
Fix #51222. CC #48016, #47666, #54516, #34255.