- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1.8k
 
Fix let_unit_value to lint when explicit unit type annotation is present #15975
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
base: master
Are you sure you want to change the base?
Fix let_unit_value to lint when explicit unit type annotation is present #15975
Conversation
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
Remove the early return that was skipping let bindings with explicit `()` type annotations. The lint should trigger for redundant unit bindings regardless of whether the type is explicitly annotated or inferred.
b2809e4    to
    90a46e9      
    Compare
  
    | 
           r? clippy  | 
    
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.
Error markers should be identical to the other one used for testing this lint (let_unit_value, not ERROR). LLM generated probably?
Also please don't use lengthy LLM generated messages for the PR description, this is tedious to read and brings little value.
          
 Fixed, that's for pointing that out. 
 Understood. Sorry for the excess. I've shortened the description to just the changelog entry, reference to issue number, and short description.  | 
    
changelog: [
let_unit_value]: Now lints when explicit unit type annotation is presentfixes #15957
This PR fixes the
let_unit_valuelint to trigger even when an explicit()type annotation is present.