-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Conversation
There was a problem hiding this 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.
src/librustc_mir/interpret/step.rs
Outdated
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"); |
There was a problem hiding this comment.
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?
@bors r=nagisa |
📌 Commit 907df8c has been approved by |
Don't abort const eval due to long running evals, just warn one check-box of #49930 r? @nagisa (rust-lang/rfcs#2344 (comment))
☀️ Test successful - status-appveyor, status-travis |
Backported in #50027 |
one check-box of #49930
r? @nagisa (rust-lang/rfcs#2344 (comment))