11warning: constant evaluation is taking a long time
2- --> $DIR/ctfe-simple-loop.rs:9 :5
2+ --> $DIR/ctfe-simple-loop.rs:8 :5
33 |
44LL | / while index < n {
55LL | |
@@ -14,49 +14,13 @@ LL | | }
1414help: the constant being evaluated
1515 --> $DIR/ctfe-simple-loop.rs:18:1
1616 |
17- LL | const X : u32 = simple_loop(19 );
17+ LL | const Y : u32 = simple_loop(3000005 );
1818 | ^^^^^^^^^^^^
1919note: the lint level is defined here
2020 --> $DIR/ctfe-simple-loop.rs:3:24
2121 |
2222LL | #![cfg_attr(warn, warn(long_running_const_eval))]
2323 | ^^^^^^^^^^^^^^^^^^^^^^^
2424
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
6226
0 commit comments