Skip to content

Downgrade unit struct match via S(..) warnings to errors - #30753

Merged
bors merged 4 commits into
rust-lang:masterfrom
pnkfelix:downgrade-29383-struct-warnings-to-errors
Jan 11, 2016
Merged

Downgrade unit struct match via S(..) warnings to errors#30753
bors merged 4 commits into
rust-lang:masterfrom
pnkfelix:downgrade-29383-struct-warnings-to-errors

Conversation

@pnkfelix

Copy link
Copy Markdown
Contributor

Downgrade unit struct match via S(..) warnings to errors

The error signalling was introduced in #29383

It was noted as a warning-cycle-less regression in #30379

Fix#30379

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @jroesch

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

@pnkfelix

Copy link
Copy Markdown
ContributorAuthor

r? @nikomatsakis

(This is high priority regression fix)

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.

Hmm, I think we should modify bad_struct_kind_err to look at is_warning and add a lint in the case of is_warning == true. This will also require adding a new lint corresponding to this future incompatibility. That said, I was going to do a quick PR to improve that tooling so as to address #30746, so maybe I could just roll that change into that.

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.

I debated about doing this but decided I was better off keeping this PR minimal to ease backporting to beta... what do you think?

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.

(I think I should have pushed back harder here. But then again I didn't expect bors to take four days to get to this)

@pnkfelix
pnkfelixforce-pushed the downgrade-29383-struct-warnings-to-errors branch from 66bafbe to 40e2ac2CompareJanuary 8, 2016 00:09
@pnkfelix

Copy link
Copy Markdown
ContributorAuthor

@nikomatsakis Okay I think this is what you want w.r.t. the lint structure. How does this look to you?

@nikomatsakis

Copy link
Copy Markdown
Contributor

Looks great!

@bors r+

@bors

bors commented Jan 8, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit 40e2ac2 has been approved by nikomatsakis

@pnkfelix

Copy link
Copy Markdown
ContributorAuthor
failures:
[compile-fail] compile-fail/match-pattern-field-mismatch-2.rs
[compile-fail] compile-fail/pattern-error-continue.rs

hmm, why did that arise on the travis build

@pnkfelix

Copy link
Copy Markdown
ContributorAuthor

@bors r-

i need to look at the two failure cases

@pnkfelix

Copy link
Copy Markdown
ContributorAuthor

@bors r=nikomatsakis fa027d1

…nd then exit.
I think that behavior is fine, so I am removing the expected warnings from these tests.
@nikomatsakis

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Jan 8, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit fa027d1 has been approved by nikomatsakis

@nikomatsakis

Copy link
Copy Markdown
Contributor

@bors r-

@nikomatsakis

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Jan 8, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit fa027d1 has been approved by nikomatsakis

@brsonbrson added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jan 8, 2016
@bors

bors commented Jan 11, 2016

Copy link
Copy Markdown
Collaborator

⌛ Testing commit fa027d1 with merge 41f7bf7...

@bors

bors commented Jan 11, 2016

Copy link
Copy Markdown
Collaborator

💔 Test failed - auto-win-msvc-32-opt

@alexcrichton

Copy link
Copy Markdown
Member

@bors: retry

On Mon, Jan 11, 2016 at 4:53 PM, bors notifications@github.com wrote:

[image: 💔] Test failed - auto-win-msvc-32-opt
http://buildbot.rust-lang.org/builders/auto-win-msvc-32-opt/builds/1878


Reply to this email directly or view it on GitHub
#30753 (comment).

@pnkfelix

Copy link
Copy Markdown
ContributorAuthor

@bors p=1

(upping priority for regression fixing or beta-nominated PR's)

@bors

bors commented Jan 11, 2016

Copy link
Copy Markdown
Collaborator

⌛ Testing commit fa027d1 with merge 5cf69aa...

bors added a commit that referenced this pull request Jan 11, 2016
…rors, r=nikomatsakis
Downgrade unit struct match via S(..) warnings to errors
The error signalling was introduced in #29383
It was noted as a warning-cycle-less regression in #30379Fix#30379
@bors
bors merged commit fa027d1 into rust-lang:masterJan 11, 2016
@pnkfelixpnkfelix added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jan 12, 2016
@pnkfelix

Copy link
Copy Markdown
ContributorAuthor

@nikomatsakis I added #30724 to the beta-nominated set because it seemed like a natural candidate for a back port to beta (and also because 40e2ac2 in this PR depends on infrastructure added by that PR)

however, given that the beta is going to be cut very soon, perhaps back porting PR #30724 would be unwise, and thus I should make a separate PR against beta branch that only goes up to 8aed830 (inclusive)

Thoughts?

Cc @brson @rust-lang/compiler

@nikomatsakis

Copy link
Copy Markdown
Contributor

@pnkfelix and I discussed on IRC -- seems like best thing is to backport this PR and just the (very few) bits of infrastructure needed to make it work.

@brsonbrson added beta-accepted Accepted for backporting to the compiler in the beta channel. and removed beta-nominated Nominated for backporting to the compiler in the beta channel. labels Jan 12, 2016
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta-acceptedAccepted for backporting to the compiler in the beta channel.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@pnkfelix@rust-highfive@nikomatsakis@bors@alexcrichton@brson@jroesch