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

Undo an assert causing an ICE until we fix the underlying problem #66250

Merged
merged 1 commit into from
Nov 11, 2019

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Nov 9, 2019

r? @eddyb

fixes #65462

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 9, 2019
@oli-obk oli-obk added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Nov 9, 2019
@oli-obk oli-obk changed the title Don't use ! layout for enums where the user specified variants even i… Undo an assert causing an ICE until we fix the underlying problem Nov 10, 2019
@eddyb
Copy link
Member

eddyb commented Nov 10, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Nov 10, 2019

📌 Commit 39fb820 has been approved by eddyb

@bors bors 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 Nov 10, 2019
@bors
Copy link
Contributor

bors commented Nov 11, 2019

⌛ Testing commit 39fb820 with merge 1062b69...

bors added a commit that referenced this pull request Nov 11, 2019
Undo an assert causing an ICE until we fix the underlying problem

r? @eddyb

fixes #65462
@bors
Copy link
Contributor

bors commented Nov 11, 2019

☀️ Test successful - checks-azure
Approved by: eddyb
Pushing 1062b69 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 11, 2019
@bors bors merged commit 39fb820 into rust-lang:master Nov 11, 2019
@rust-highfive
Copy link
Collaborator

📣 Toolstate changed by #66250!

Tested on commit 1062b69.
Direct link to PR: #66250

💔 rustc-guide on linux: test-pass → test-fail (cc @amanjeev @spastorino @mark-i-m, @rust-lang/infra).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Nov 11, 2019
Tested on commit rust-lang/rust@1062b69.
Direct link to PR: <rust-lang/rust#66250>

💔 rustc-guide on linux: test-pass → test-fail (cc @amanjeev @spastorino @mark-i-m, @rust-lang/infra).
@pnkfelix pnkfelix added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Nov 14, 2019
@oli-obk oli-obk deleted the no_fields_in_empty_unions branch November 14, 2019 15:42
@Mark-Simulacrum
Copy link
Member

Leaving a note here that if we don't beta accept this PR we should make sure to open an issue tracking this regression so we don't forget about it.

@pnkfelix
Copy link
Member

beta-accepted (last week, sorry for delay!)

@pnkfelix pnkfelix added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Nov 21, 2019
@Mark-Simulacrum Mark-Simulacrum removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Dec 5, 2019
bors added a commit that referenced this pull request Dec 7, 2019
[beta] backports

This pull request backports the following pull requests, which have all been beta-accepted by the
compiler team.

 * Handle non_exhaustive in borrow checking #66722
 * Do not ICE on trait aliases with missing obligations #66392
 * Do not ICE in `if` without `else` in `async fn` #66391
 * Fix ICE when trying to suggest `Type<>` instead of `Type()` #66390
 * Do not ICE on recovery from unmet associated type bound obligation #66388
 * find_deprecation: deprecation attr may be ill-formed meta. #66381
 * parser: don't use `unreachable!()` in `fn unexpected`. #66361
 * Undo an assert causing an ICE until we fix the underlying problem #66250
 * Do not ICE with a precision flag in formatting str and no format arguments #66093
 * Fix two OOM issues related to `ConstProp` #66394
bors added a commit that referenced this pull request Dec 8, 2019
[beta] backports

This pull request backports the following pull requests, which have all been beta-accepted by the
compiler team.

 * Handle non_exhaustive in borrow checking #66722
 * Do not ICE on trait aliases with missing obligations #66392
 * Do not ICE in `if` without `else` in `async fn` #66391
 * Fix ICE when trying to suggest `Type<>` instead of `Type()` #66390
 * Do not ICE on recovery from unmet associated type bound obligation #66388
 * find_deprecation: deprecation attr may be ill-formed meta. #66381
 * parser: don't use `unreachable!()` in `fn unexpected`. #66361
 * Undo an assert causing an ICE until we fix the underlying problem #66250
 * Do not ICE with a precision flag in formatting str and no format arguments #66093
 * Fix two OOM issues related to `ConstProp` #66394
Comment on lines -698 to -699
assert!(i < count,
"Tried to access field {} of union with {} fields", i, count);
Copy link
Member

Choose a reason for hiding this comment

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

Would have been good to at least leave a FIXME in place here so that future readers of this code know there should be an assertion. I just had to rediscover this by browsing the rustc source starting somewhere in codegen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant 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.

ICE: "Tried to access field 0 of union with 0 fields"
7 participants