Skip to content

Commit

Permalink
Add a tracking issue for making the warning a lint
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk authored Apr 15, 2018
1 parent 4f6d118 commit 907df8c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/librustc_mir/interpret/step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M> {
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 {
// FIXME(#49980): make this warning a lint
self.tcx.sess.span_warn(self.frame().span, "Constant evaluating a complex constant, this might take some time");
self.terminators_remaining = 1_000_000;
}
Expand Down

0 comments on commit 907df8c

Please sign in to comment.