diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-11-24 21:34:55 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-24 21:34:55 +0100 |
| commit | 679f1b7892841131efcdb535a7aa579038cfded7 (patch) | |
| tree | 897b646f80cfd34cfd4f349b2864a40acb9fb70f /src/test | |
| parent | 4843946a10979e25ce4b26def0d19845e15d5f95 (diff) | |
| parent | 6c2719a6d6d69dda07332f9f200d5fee19ae0096 (diff) | |
| download | rust-679f1b7892841131efcdb535a7aa579038cfded7.tar.gz rust-679f1b7892841131efcdb535a7aa579038cfded7.zip | |
Rollup merge of #104782 - oli-obk:const_eval_limit_bump, r=pnkfelix
Bump the const eval step limit fixes https://github.com/rust-lang/rust/issues/103814 https://github.com/rust-lang/rust/pull/103877 has too much of an impact to beta backport. So let's just increase the limit, avoiding the immediate breakage. r? ``@pnkfelix``
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/consts/const-eval/infinite_loop.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/consts/const-eval/infinite_loop.stderr | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/test/ui/consts/const-eval/infinite_loop.rs b/src/test/ui/consts/const-eval/infinite_loop.rs index 14a573ccf5a..4babc9a2850 100644 --- a/src/test/ui/consts/const-eval/infinite_loop.rs +++ b/src/test/ui/consts/const-eval/infinite_loop.rs @@ -4,8 +4,8 @@ fn main() { let _ = [(); { let mut n = 113383; // #20 in https://oeis.org/A006884 while n != 0 { - n = if n % 2 == 0 { n/2 } else { 3*n + 1 }; //~^ ERROR evaluation of constant value failed + n = if n % 2 == 0 { n/2 } else { 3*n + 1 }; } n }]; diff --git a/src/test/ui/consts/const-eval/infinite_loop.stderr b/src/test/ui/consts/const-eval/infinite_loop.stderr index 3b5a0f22f28..8b58cb279f3 100644 --- a/src/test/ui/consts/const-eval/infinite_loop.stderr +++ b/src/test/ui/consts/const-eval/infinite_loop.stderr @@ -1,8 +1,8 @@ error[E0080]: evaluation of constant value failed - --> $DIR/infinite_loop.rs:7:20 + --> $DIR/infinite_loop.rs:6:15 | -LL | n = if n % 2 == 0 { n/2 } else { 3*n + 1 }; - | ^^^^^^^^^^ exceeded interpreter step limit (see `#[const_eval_limit]`) +LL | while n != 0 { + | ^^^^^^ exceeded interpreter step limit (see `#[const_eval_limit]`) error: aborting due to previous error |
