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

warning: constant evaluation is taking a long time
  --> $DIR/ctfe-simple-loop.rs:9:5
   |
LL | /     while index < n {
LL | |
LL | |
LL | |
LL | |         index = index + 1;
LL | |     }
   | |_____^
   |
   = note: this lint makes sure the compiler doesn't get stuck due to infinite loops in const eval.
           If your compilation actually takes a long time, you can safely allow the lint.
help: the constant being evaluated
  --> $DIR/ctfe-simple-loop.rs:19:1
   |
LL | const Y: u32 = simple_loop(35);
   | ^^^^^^^^^^^^
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

warning: constant evaluation is taking a long time
  --> $DIR/ctfe-simple-loop.rs:9:5
   |
LL | /     while index < n {
LL | |
LL | |
LL | |
LL | |         index = index + 1;
LL | |     }
   | |_____^ the const evaluator is currently interpreting this expression
   |
help: the constant being evaluated
  --> $DIR/ctfe-simple-loop.rs:19:1
   |
LL | const Y: u32 = simple_loop(35);
   | ^^^^^^^^^^^^

warning: 3 warnings emitted