Commit 72c99f2
authored
Rollup merge of rust-lang#70087 - ecstatic-morse:remove-const-eval-loop-detector, r=RalfJung
Remove const eval loop detector
Now that there is a configurable instruction limit for CTFE (see rust-lang#67260), we can replace the loop detector with something much simpler. See rust-lang#66946 for more discussion about this. Although the instruction limit is nightly-only, the only practical way to reach the default limit uses nightly-only features as well (although CTFE will still execute code using such features inside an array initializer on stable).
This will at the very least require a crater run, since it will result in an error wherever the "long running const eval" warning appeared before. We may need to increase the default for `const_eval_limit` to work around this.
Resolves rust-lang#54384 cc rust-lang#49980
r? @oli-obk cc @RalfJungFile tree
12 files changed
+73
-564
lines changed- src
- librustc_mir
- const_eval
- interpret
- librustc/mir/interpret
- test/ui/consts
- const-eval
- const_limit
12 files changed
+73
-564
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
497 | | - | |
498 | | - | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
499 | 501 | | |
500 | 502 | | |
501 | 503 | | |
| |||
505 | 507 | | |
506 | 508 | | |
507 | 509 | | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
16 | | - | |
17 | | - | |
| 15 | + | |
| 16 | + | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | | - | |
| 21 | + | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
86 | 85 | | |
87 | 86 | | |
88 | 87 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
105 | 95 | | |
106 | 96 | | |
107 | 97 | | |
| |||
110 | 100 | | |
111 | 101 | | |
112 | 102 | | |
113 | | - | |
| 103 | + | |
114 | 104 | | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
| 105 | + | |
123 | 106 | | |
124 | 107 | | |
125 | 108 | | |
| |||
173 | 156 | | |
174 | 157 | | |
175 | 158 | | |
176 | | - | |
177 | | - | |
| 159 | + | |
178 | 160 | | |
179 | 161 | | |
180 | 162 | | |
| |||
184 | 166 | | |
185 | 167 | | |
186 | 168 | | |
187 | | - | |
| 169 | + | |
188 | 170 | | |
189 | 171 | | |
190 | 172 | | |
| |||
345 | 327 | | |
346 | 328 | | |
347 | 329 | | |
348 | | - | |
| 330 | + | |
| 331 | + | |
349 | 332 | | |
350 | 333 | | |
351 | 334 | | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
364 | 338 | | |
365 | 339 | | |
366 | | - | |
367 | | - | |
| 340 | + | |
368 | 341 | | |
369 | 342 | | |
370 | 343 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | 115 | | |
135 | 116 | | |
136 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
| |||
0 commit comments