]>
Commit | Line | Data |
---|---|---|
fe692bf9 | 1 | error: constant evaluation is taking a long time |
9ffffee4 | 2 | --> $DIR/issue-52475.rs:5:9 |
8faf50e0 | 3 | | |
9ffffee4 | 4 | LL | / while n < 5 { |
fe692bf9 | 5 | LL | | |
9ffffee4 FG |
6 | LL | | n = (n + 1) % 5; |
7 | LL | | x = &0; // Materialize a new AllocId | |
8 | LL | | } | |
fe692bf9 FG |
9 | | |_________^ |
10 | | | |
11 | = note: this lint makes sure the compiler doesn't get stuck due to infinite loops in const eval. | |
12 | If your compilation actually takes a long time, you can safely allow the lint. | |
13 | help: the constant being evaluated | |
14 | --> $DIR/issue-52475.rs:2:18 | |
15 | | | |
16 | LL | let _ = [(); { | |
17 | | __________________^ | |
18 | LL | | let mut x = &0; | |
19 | LL | | let mut n = 0; | |
20 | LL | | while n < 5 { | |
21 | ... | | |
22 | LL | | 0 | |
23 | LL | | }]; | |
24 | | |_____^ | |
25 | = note: `#[deny(long_running_const_eval)]` on by default | |
8faf50e0 | 26 | |
4b012472 | 27 | error: aborting due to 1 previous error |
8faf50e0 | 28 |