Skip to content

Don't abort const eval due to long running evals, just warn - #49947

Merged
bors merged 2 commits into
rust-lang:masterfrom
oli-obk:turing_complete_const_eval
Apr 16, 2018
Merged

Don't abort const eval due to long running evals, just warn#49947
bors merged 2 commits into
rust-lang:masterfrom
oli-obk:turing_complete_const_eval

Conversation

@oli-obk

Copy link
Copy Markdown
Contributor

@oli-obkoli-obk added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Apr 13, 2018
@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 13, 2018

@nagisanagisa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

r=me with an issue and a comment.

pub fn inc_step_counter_and_check_limit(&mut self, n: usize) {
self.terminators_remaining = self.terminators_remaining.saturating_sub(n);
if self.terminators_remaining == 0 {
self.tcx.sess.span_warn(self.frame().span, "Constant evaluating a complex constant, this might take some time");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you fill an issue that raises a question of making this a lint-warning and link the issue with a comment here?

@oli-obk

Copy link
Copy Markdown
ContributorAuthor

@bors r=nagisa

@bors

bors commented Apr 15, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit 907df8c has been approved by nagisa

@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 Apr 15, 2018
@bors

bors commented Apr 15, 2018

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 907df8c with merge 8de5353...

bors added a commit that referenced this pull request Apr 15, 2018
Don't abort const eval due to long running evals, just warn
one check-box of #49930
r? @nagisa (rust-lang/rfcs#2344 (comment))
@bors

bors commented Apr 16, 2018

Copy link
Copy Markdown
Collaborator

☀️ Test successful - status-appveyor, status-travis
Approved by: nagisa
Pushing 8de5353 to master...

@bors
bors merged commit 907df8c into rust-lang:masterApr 16, 2018
@oli-obkoli-obk removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Apr 17, 2018
@oli-obkoli-obk mentioned this pull request Apr 17, 2018
@emilyalbiniemilyalbini added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Apr 17, 2018
@pnkfelixpnkfelix added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Apr 19, 2018
@nagisanagisa added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Apr 19, 2018
bors added a commit that referenced this pull request Apr 19, 2018
[beta] backport various PRs
original PRs:
* #49949 (not yet merged at the time of writing)
* #49947 (long running const eval error -> warning)
* #49833 (static recursion)
* #49876 (no clippy in stable rls)
* #49904 (Work around LLVM debuginfo problem in librustc_driver. )
@alexcrichtonalexcrichton removed the beta-accepted Accepted for backporting to the compiler in the beta channel. label Apr 20, 2018
@alexcrichton

Copy link
Copy Markdown
Member

Backported in #50027

@emilyalbiniemilyalbini removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Apr 20, 2018
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.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

@oli-obk@bors@alexcrichton@nagisa@pnkfelix@emilyalbini@rust-highfive