Skip to content

lit_to_const: gracefully bubble up type errors. - #69330

Merged
bors merged 1 commit into
rust-lang:masterfrom
Centril:literally-melting-ice
Feb 21, 2020
Merged

lit_to_const: gracefully bubble up type errors.#69330
bors merged 1 commit into
rust-lang:masterfrom
Centril:literally-melting-ice

Conversation

@Centril

Copy link
Copy Markdown
Contributor

Fixes#69310 which was injected by #68118.

r? @pnkfelix@varkor@eddyb
cc @Skinny121

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 20, 2020
@CentrilCentril added beta-nominated Nominated for backporting to the compiler in the beta channel. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 20, 2020
Comment on lines 30 to 33

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.

Reminder to self that reviewing this is best done in "No Whitespace" mode.

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.

Indeed :)

Comment on lines 148 to 149

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.

@oli-obk This isn't new in this PR but I wonder why this isn't undef or something (I guess that might cause ICEs?). Maybe we need a ty::ConstKind::Err (if we don't have it already)?

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.

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.

Adding one is probably a good idea (but can be done in a separate PR).

Comment threadsrc/librustc/mir/interpret/mod.rs Outdated
Comment threadsrc/librustc_mir_build/hair/constant.rs Outdated

@eddybeddyb 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=me modulo nits

@Centril
Centrilforce-pushed the literally-melting-ice branch from f040e15 to 748dd45CompareFebruary 20, 2020 22:45
@Centril

Copy link
Copy Markdown
ContributorAuthor

Nits fixed, r? @eddyb@bors r=eddyb

@bors

bors commented Feb 20, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 748dd45 has been approved by eddyb

@rust-highfiverust-highfive assigned eddyb and unassigned pnkfelixFeb 20, 2020
@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 Feb 20, 2020
@bors

bors commented Feb 21, 2020

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 748dd45 with merge 212aa3e...

@bors

bors commented Feb 21, 2020

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-azure
Approved by: eddyb
Pushing 212aa3e to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Feb 21, 2020
@bors
bors merged commit 212aa3e into rust-lang:masterFeb 21, 2020
@Centril
Centril deleted the literally-melting-ice branch February 21, 2020 15:54
@pnkfelix

Copy link
Copy Markdown
Contributor

discussed in T-compiler meeting. beta-accepted.

@pnkfelixpnkfelix added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Feb 27, 2020
@Mark-SimulacrumMark-Simulacrum mentioned this pull request Feb 28, 2020
@Mark-SimulacrumMark-Simulacrum removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Feb 28, 2020
bors added a commit that referenced this pull request Feb 28, 2020
[beta] backports
This backports the following PRs:
* ci: switch macOS builders to 10.15 #68863
* Backport release notes of 1.41.1 #69468
* Cherry-pick the LLVM fix for #69225#69450
* `lit_to_const`: gracefully bubble up type errors. #69330
* [beta] bootstrap from 1.41.1 stable #69518
* bootstrap: Configure cmake when building sanitizer runtimes #69104
r? @ghost
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.merged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.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.

internal compiler error: src/librustc_mir_build/hair/constant.rs:60: impossible case reached

6 participants

@Centril@bors@pnkfelix@eddyb@Mark-Simulacrum@rust-highfive