Update Tests
This commit is contained in:
parent
0ee7cb5e36
commit
a35da65409
@ -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
|
||||
}
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user