Commit ce40196
committed
Auto merge of rust-lang#132992 - RalfJung:check-consts-feature-gate, r=compiler-errors
check_consts: fix error requesting feature gate when that gate is not actually needed
When working on rust-lang/hashbrown#586 I noticed that the compiler asks for the `rustc_private` feature to be enabled if one forgets to set `rustc_const_stable_indirect` on a function -- but enabling `rustc_private` would not actually help. This fixes the diagnostics.
r? `@compiler-errors`File tree
3 files changed
+37
-13
lines changed- compiler/rustc_const_eval/src/check_consts
- tests/ui/consts/min_const_fn
3 files changed
+37
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
276 | | - | |
277 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
278 | 287 | | |
279 | 288 | | |
280 | 289 | | |
| |||
745 | 754 | | |
746 | 755 | | |
747 | 756 | | |
748 | | - | |
| 757 | + | |
749 | 758 | | |
750 | 759 | | |
751 | 760 | | |
| |||
800 | 809 | | |
801 | 810 | | |
802 | 811 | | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
803 | 818 | | |
804 | 819 | | |
805 | 820 | | |
| |||
830 | 845 | | |
831 | 846 | | |
832 | 847 | | |
833 | | - | |
834 | | - | |
835 | | - | |
836 | | - | |
837 | | - | |
838 | | - | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
839 | 851 | | |
840 | 852 | | |
841 | 853 | | |
| 854 | + | |
842 | 855 | | |
843 | 856 | | |
844 | 857 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| |||
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
| 88 | + | |
85 | 89 | | |
86 | 90 | | |
87 | 91 | | |
| |||
330 | 334 | | |
331 | 335 | | |
332 | 336 | | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
333 | 340 | | |
334 | 341 | | |
335 | 342 | | |
336 | 343 | | |
337 | 344 | | |
338 | 345 | | |
339 | 346 | | |
| 347 | + | |
340 | 348 | | |
341 | 349 | | |
342 | 350 | | |
343 | 351 | | |
344 | 352 | | |
345 | 353 | | |
| 354 | + | |
346 | 355 | | |
347 | 356 | | |
348 | 357 | | |
| |||
376 | 385 | | |
377 | 386 | | |
378 | 387 | | |
379 | | - | |
| 388 | + | |
380 | 389 | | |
381 | 390 | | |
382 | 391 | | |
383 | 392 | | |
384 | 393 | | |
385 | 394 | | |
386 | | - | |
| 395 | + | |
| 396 | + | |
387 | 397 | | |
388 | 398 | | |
389 | 399 | | |
| |||
410 | 420 | | |
411 | 421 | | |
412 | 422 | | |
| 423 | + | |
413 | 424 | | |
414 | 425 | | |
415 | 426 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments