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

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

Merged
merged 2 commits into from
Apr 16, 2018

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Apr 13, 2018

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

@nagisa nagisa left a comment

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
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
Contributor Author

oli-obk commented Apr 15, 2018

@bors r=nagisa

@bors
Copy link
Contributor

bors commented Apr 15, 2018

📌 Commit 907df8c has been approved by nagisa

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

bors commented Apr 15, 2018

⌛ 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
Copy link
Contributor

bors commented Apr 16, 2018

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

@bors bors merged commit 907df8c into rust-lang:master Apr 16, 2018
@oli-obk oli-obk removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Apr 17, 2018
@pietroalbini pietroalbini added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Apr 17, 2018
@pnkfelix pnkfelix added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Apr 19, 2018
@nagisa nagisa 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. )
@alexcrichton alexcrichton removed the beta-accepted Accepted for backporting to the compiler in the beta channel. label Apr 20, 2018
@alexcrichton
Copy link
Member

Backported in #50027

@pietroalbini pietroalbini removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Apr 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

7 participants