- 
        Couldn't load subscription status. 
- Fork 13.9k
Reduce the diagnostic spam when multiple fields are missing in pattern #49160
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
Reduce the diagnostic spam when multiple fields are missing in pattern #49160
Conversation
| r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) | 
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.
r? @oli-obk iirc eddyb doesn't like diagnostics PRs
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.
did you forget to generate or git add a .stderr file?
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.
Added.
        
          
                src/librustc_typeck/check/_match.rs
              
                Outdated
          
        
      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 think the labels could just be unknown field instead of repeating all information
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.
or, since these are usually very compact, do something similar to use imports:
warning: unused imports: `u32`, `usize`
 --> src/main.rs:1:11
  |
1 | use std::{usize, u32};
  |           ^^^^^  ^^^
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.
3fff16c    to
    97cf809      
    Compare
  
    16987ae    to
    0d6ba1d      
    Compare
  
    0d6ba1d    to
    062a46f      
    Compare
  
    | @bors r+ Looks sooo much better than the old spammy messages! | 
| 📌 Commit 062a46f has been approved by  | 
| @bors rollup | 
…, r=oli-obk Reduce the diagnostic spam when multiple fields are missing in pattern Fix rust-lang#47457.
…, r=oli-obk Reduce the diagnostic spam when multiple fields are missing in pattern Fix rust-lang#47457.
…, r=oli-obk Reduce the diagnostic spam when multiple fields are missing in pattern Fix rust-lang#47457.
| ☔ The latest upstream changes (presumably #49308) made this pull request unmergeable. Please resolve the merge conflicts. | 
Fix #47457.