Skip to content
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

Remove Visibility field from enum variants #28442

Merged
merged 3 commits into from
Sep 18, 2015

Conversation

nagisa
Copy link
Member

@nagisa nagisa commented Sep 16, 2015

Followup on #28440

Do not merge before the referenced PR is merged. I will fix the PR once that is merged (or close if it is not)

@rust-highfive
Copy link
Collaborator

r? @sfackler

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

@alexcrichton
Copy link
Member

would it be possible to land this with #28440? It's a little unfortunate to have dependencies between PRs.

@steveklabnik
Copy link
Member

Agree with Alex that this seems to be a clear bugfix, but more crater runs are always better 👍

On Sep 16, 2015, at 22:42, Alex Crichton notifications@github.com wrote:

would it be possible to land this with #28440? It's a little unfortunate to have dependencies between PRs.


Reply to this email directly or view it on GitHub.

@nagisa nagisa force-pushed the remove-enum-vis-field branch from 4f4beb3 to f5a99ae Compare September 17, 2015 07:03
@nagisa
Copy link
Member Author

nagisa commented Sep 17, 2015

I’m fine with @matklad cherry-picking commits from this PR and I can rebase onto his work as well.

@matklad what’s your preferred course of action?

(NOTE: I had to rebase e3be84c onto master first, because there were some non-trivial merge conflicts otherwise)

@matklad
Copy link
Member

matklad commented Sep 17, 2015

Let's continue with this PR and close #28440

Note that there is one more PR which somehow relates to this issue: #28444

To avoid further PR dependencies, I'd suggest adding

//~ ERROR: expected one of `(`, `,`, `=`, `{`, or `}`, found `duck`

to the parse-fail/issue-28433.

@alexcrichton
Copy link
Member

Crater's having a little trouble this morning so it may be a moment before I get results, but they're on the way!

@alexcrichton
Copy link
Member

Looks like this has zero regressions on crater.

cc @rust-lang/lang, @brson, any objections to patching this hole without a warning? I'd be fine just mentioning this in the release notes and merging as is personally

@nikomatsakis
Copy link
Contributor

Given the crater impact, I'd say no warning cycle is needed.

@aturon
Copy link
Member

aturon commented Sep 17, 2015

Agreed, let's just fix it.

@@ -1131,14 +1118,10 @@ impl<'a, 'tcx> SanePrivacyVisitor<'a, 'tcx> {
check_inherited(tcx, i.span, i.vis);
}
}
hir::ItemEnum(ref def, _) => {
Copy link
Member Author

Choose a reason for hiding this comment

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

Ah by the way, I want a super review on this removal by somebody familiar with rustc_privacy. I’m not exactly super familiar with rustc_privacy myself and since no tests got broken, I assume it is fine.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah this is fine, it's just checking that inside functions any non-inherited visibility yield an error but if variants don't have visibility there's no need to check.

@alexcrichton
Copy link
Member

@bors: r+ a9cb51c

Thanks @nagisa!

@alexcrichton alexcrichton added the relnotes Marks issues that should be documented in the release notes of the next release. label Sep 18, 2015
bors added a commit that referenced this pull request Sep 18, 2015
Followup on #28440 

Do not merge before the referenced PR is merged. I will fix the PR once that is merged (or close if it is not)
@bors
Copy link
Contributor

bors commented Sep 18, 2015

⌛ Testing commit a9cb51c with merge 72a10fa...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes Marks issues that should be documented in the release notes of the next release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants