1
1
warning: constant evaluation is taking a long time
2
- --> $DIR/ctfe-simple-loop.rs:9 :5
2
+ --> $DIR/ctfe-simple-loop.rs:8 :5
3
3
|
4
4
LL | / while index < n {
5
5
LL | |
@@ -14,49 +14,13 @@ LL | | }
14
14
help: the constant being evaluated
15
15
--> $DIR/ctfe-simple-loop.rs:18:1
16
16
|
17
- LL | const X : u32 = simple_loop(19 );
17
+ LL | const Y : u32 = simple_loop(3000005 );
18
18
| ^^^^^^^^^^^^
19
19
note: the lint level is defined here
20
20
--> $DIR/ctfe-simple-loop.rs:3:24
21
21
|
22
22
LL | #![cfg_attr(warn, warn(long_running_const_eval))]
23
23
| ^^^^^^^^^^^^^^^^^^^^^^^
24
24
25
- warning: constant evaluation is taking a long time
26
- --> $DIR/ctfe-simple-loop.rs:9:5
27
- |
28
- LL | / while index < n {
29
- LL | |
30
- LL | |
31
- LL | |
32
- LL | | index = index + 1;
33
- LL | | }
34
- | |_____^
35
- |
36
- = note: this lint makes sure the compiler doesn't get stuck due to infinite loops in const eval.
37
- If your compilation actually takes a long time, you can safely allow the lint.
38
- help: the constant being evaluated
39
- --> $DIR/ctfe-simple-loop.rs:19:1
40
- |
41
- LL | const Y: u32 = simple_loop(35);
42
- | ^^^^^^^^^^^^
43
-
44
- warning: constant evaluation is taking a long time
45
- --> $DIR/ctfe-simple-loop.rs:9:5
46
- |
47
- LL | / while index < n {
48
- LL | |
49
- LL | |
50
- LL | |
51
- LL | | index = index + 1;
52
- LL | | }
53
- | |_____^ the const evaluator is currently interpreting this expression
54
- |
55
- help: the constant being evaluated
56
- --> $DIR/ctfe-simple-loop.rs:19:1
57
- |
58
- LL | const Y: u32 = simple_loop(35);
59
- | ^^^^^^^^^^^^
60
-
61
- warning: 3 warnings emitted
25
+ warning: 1 warning emitted
62
26
0 commit comments