Update Tests

This commit is contained in:
Veera 2024-09-21 11:11:11 -04:00
parent 0ee7cb5e36
commit a35da65409
2 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,24 @@
//@ check-pass
#![allow(long_running_const_eval)]
//@ compile-flags: -Z tiny-const-eval-limit -Z deduplicate-diagnostics=yes
const FOO: () = {
let mut i = 0;
loop {
//~^ WARN is taking a long time
//~| WARN is taking a long time
//~| WARN is taking a long time
//~| WARN is taking a long time
//~| WARN is taking a long time
if i == 1000 {
break;
} else {
i += 1;
}
}
};
fn main() {
FOO
}

View File

@ -0,0 +1,20 @@
warning: constant evaluation is taking a long time
--> $DIR/evade-deduplication-issue-118612.rs:8:5
|
LL | / loop {
LL | |
LL | |
LL | |
... |
LL | | }
LL | | }
| |_____^ the const evaluator is currently interpreting this expression
|
help: the constant being evaluated
--> $DIR/evade-deduplication-issue-118612.rs:6:1
|
LL | const FOO: () = {
| ^^^^^^^^^^^^^
warning: 1 warning emitted