Skip to content

Ensure that panicking in constants eventually errors - #67164

Merged
bors merged 2 commits into
rust-lang:masterfrom
matthewjasper:never-remove-const
Dec 11, 2019
Merged

Ensure that panicking in constants eventually errors#67164
bors merged 2 commits into
rust-lang:masterfrom
matthewjasper:never-remove-const

Conversation

@matthewjasper

Copy link
Copy Markdown
Contributor

based on #67134

closes#66975

r? @oli-obk

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 8, 2019
@oli-obk

Copy link
Copy Markdown
Contributor

Please also add the test from the issue as a ui test showing that we error if the value is actually used.

@oli-obk

Copy link
Copy Markdown
Contributor

Also, does your change fix

#![feature(const_panic)]#![allow(const_err)]constVOID: ! = panic!();fnmain(){let _ = VOID;}

Or will this still compile?

@oli-obk

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Dec 10, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit d2ed209 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 Dec 10, 2019
Centril added a commit to Centril/rust that referenced this pull request Dec 11, 2019
…=oli-obk
Ensure that panicking in constants eventually errors
based on rust-lang#67134closesrust-lang#66975
r? @oli-obk
@CentrilCentril mentioned this pull request Dec 11, 2019
bors added a commit that referenced this pull request Dec 11, 2019
Rollup of 6 pull requests
Successful merges:
- #66881 (Optimize Ord trait implementation for bool)
- #67015 (Fix constant propagation for scalar pairs)
- #67074 (Add options to --extern flag.)
- #67164 (Ensure that panicking in constants eventually errors)
- #67174 (Remove `checked_add` in `Layout::repeat`)
- #67205 (Make `publish_toolstate.sh` executable)
Failed merges:
r? @ghost
@bors
bors merged commit d2ed209 into rust-lang:masterDec 11, 2019
@matthewjasper
matthewjasper deleted the never-remove-const branch December 15, 2019 16:24
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Program that uses the const VOID: ! =panic!() associated constant compiles and runs into illegal intruction.

4 participants

@matthewjasper@oli-obk@bors@rust-highfive