Skip to content

Commit a35da65

Browse files
Update Tests
1 parent 0ee7cb5 commit a35da65

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//@ check-pass
2+
3+
#![allow(long_running_const_eval)]
4+
5+
//@ compile-flags: -Z tiny-const-eval-limit -Z deduplicate-diagnostics=yes
6+
const FOO: () = {
7+
let mut i = 0;
8+
loop {
9+
//~^ WARN is taking a long time
10+
//~| WARN is taking a long time
11+
//~| WARN is taking a long time
12+
//~| WARN is taking a long time
13+
//~| WARN is taking a long time
14+
if i == 1000 {
15+
break;
16+
} else {
17+
i += 1;
18+
}
19+
}
20+
};
21+
22+
fn main() {
23+
FOO
24+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
warning: constant evaluation is taking a long time
2+
--> $DIR/evade-deduplication-issue-118612.rs:8:5
3+
|
4+
LL | / loop {
5+
LL | |
6+
LL | |
7+
LL | |
8+
... |
9+
LL | | }
10+
LL | | }
11+
| |_____^ the const evaluator is currently interpreting this expression
12+
|
13+
help: the constant being evaluated
14+
--> $DIR/evade-deduplication-issue-118612.rs:6:1
15+
|
16+
LL | const FOO: () = {
17+
| ^^^^^^^^^^^^^
18+
19+
warning: 1 warning emitted
20+

0 commit comments

Comments
 (0)