Skip to content

Reduce the diagnostic spam when multiple fields are missing in pattern - #49160

Merged
alexcrichton merged 3 commits into
rust-lang:masterfrom
estebank:issue-47457-missing-fields
Mar 23, 2018
Merged

Reduce the diagnostic spam when multiple fields are missing in pattern#49160
alexcrichton merged 3 commits into
rust-lang:masterfrom
estebank:issue-47457-missing-fields

Conversation

@estebank

Copy link
Copy Markdown
Contributor

Fix#47457.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 19, 2018
@estebankestebank changed the title Reduce the diagnostic span when multiple fields are missing in patternReduce the diagnostic spam when multiple fields are missing in patternMar 19, 2018

@oli-obkoli-obk left a comment

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

Comment threadsrc/librustc_typeck/check/_match.rs Outdated

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

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};
| ^^^^^ ^^^

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oli-obkoli-obk assigned oli-obk and unassigned eddybMar 19, 2018
@estebank
estebankforce-pushed the issue-47457-missing-fields branch 3 times, most recently from 3fff16c to 97cf809CompareMarch 19, 2018 19:53
@estebank
estebankforce-pushed the issue-47457-missing-fields branch 5 times, most recently from 16987ae to 0d6ba1dCompareMarch 20, 2018 01:17
@estebank
estebankforce-pushed the issue-47457-missing-fields branch from 0d6ba1d to 062a46fCompareMarch 20, 2018 03:00
@oli-obk

Copy link
Copy Markdown
Contributor

@bors r+

Looks sooo much better than the old spammy messages!

@bors

bors commented Mar 20, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit 062a46f has been approved by oli-obk

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 20, 2018
@estebank

Copy link
Copy Markdown
ContributorAuthor

@bors rollup

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Mar 23, 2018
…, r=oli-obk
Reduce the diagnostic spam when multiple fields are missing in pattern
Fixrust-lang#47457.
@frewsxcvfrewsxcv mentioned this pull request Mar 23, 2018
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Mar 23, 2018
…, r=oli-obk
Reduce the diagnostic spam when multiple fields are missing in pattern
Fixrust-lang#47457.
@frewsxcvfrewsxcv mentioned this pull request Mar 23, 2018
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Mar 23, 2018
…, r=oli-obk
Reduce the diagnostic spam when multiple fields are missing in pattern
Fixrust-lang#47457.
bors added a commit that referenced this pull request Mar 23, 2018
@bors

bors commented Mar 23, 2018

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #49308) made this pull request unmergeable. Please resolve the merge conflicts.

@borsbors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 23, 2018
@alexcrichton
alexcrichton merged commit 062a46f into rust-lang:masterMar 23, 2018
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-authorStatus: This is awaiting some action (such as code changes or more information) from the author.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@estebank@rust-highfive@oli-obk@bors@alexcrichton@eddyb