diff options
| author | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2020-03-17 16:07:29 -0700 |
|---|---|---|
| committer | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2020-03-17 16:09:53 -0700 |
| commit | 5b66f27ed34849a849bd93ce662bffeec2e56947 (patch) | |
| tree | 6676513e215aa86b48345512048784e2ab442123 /src/librustc | |
| parent | 7ceebd98c6a15ae30e772eebb676b63ffa1a8122 (diff) | |
| download | rust-5b66f27ed34849a849bd93ce662bffeec2e56947.tar.gz rust-5b66f27ed34849a849bd93ce662bffeec2e56947.zip | |
Use `const_eval_limit` instead of infinite loop detector
Diffstat (limited to 'src/librustc')
| -rw-r--r-- | src/librustc/mir/interpret/error.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/librustc/mir/interpret/error.rs b/src/librustc/mir/interpret/error.rs index 0b33408edf0..4b1fad5d0b3 100644 --- a/src/librustc/mir/interpret/error.rs +++ b/src/librustc/mir/interpret/error.rs @@ -565,8 +565,10 @@ impl fmt::Debug for UnsupportedOpInfo<'tcx> { pub enum ResourceExhaustionInfo { /// The stack grew too big. StackFrameLimitReached, - /// The program ran into an infinite loop. - InfiniteLoop, + /// The program ran for too long. + /// + /// The exact limit is set by the `const_eval_limit` attribute. + TimeLimitReached, } impl fmt::Debug for ResourceExhaustionInfo { @@ -576,11 +578,7 @@ impl fmt::Debug for ResourceExhaustionInfo { StackFrameLimitReached => { write!(f, "reached the configured maximum number of stack frames") } - InfiniteLoop => write!( - f, - "duplicate interpreter state observed here, const evaluation will never \ - terminate" - ), + TimeLimitReached => write!(f, "exceeded interpreter time limit"), } } } |
