From dc0db358abe19481e475e10c32149b53370f1a1c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 05:57:31 +0200 Subject: Merging upstream version 1.72.1+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/consts/const-eval/infinite_loop.stderr | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'tests/ui/consts/const-eval/infinite_loop.stderr') diff --git a/tests/ui/consts/const-eval/infinite_loop.stderr b/tests/ui/consts/const-eval/infinite_loop.stderr index f30bfaf3f..f0434a847 100644 --- a/tests/ui/consts/const-eval/infinite_loop.stderr +++ b/tests/ui/consts/const-eval/infinite_loop.stderr @@ -1,12 +1,27 @@ -error[E0080]: evaluation of constant value failed +error: constant evaluation is taking a long time --> $DIR/infinite_loop.rs:6:9 | LL | / while n != 0 { LL | | -LL | | n = if n % 2 == 0 { n/2 } else { 3*n + 1 }; +LL | | n = if n % 2 == 0 { n / 2 } else { 3 * n + 1 }; LL | | } - | |_________^ exceeded interpreter step limit (see `#[const_eval_limit]`) + | |_________^ + | + = note: this lint makes sure the compiler doesn't get stuck due to infinite loops in const eval. + If your compilation actually takes a long time, you can safely allow the lint. +help: the constant being evaluated + --> $DIR/infinite_loop.rs:4:18 + | +LL | let _ = [(); { + | __________________^ +LL | | let mut n = 113383; // #20 in https://oeis.org/A006884 +LL | | while n != 0 { +LL | | +... | +LL | | n +LL | | }]; + | |_____^ + = note: `#[deny(long_running_const_eval)]` on by default error: aborting due to previous error -For more information about this error, try `rustc --explain E0080`. -- cgit v1.2.3