This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit b8c8287
committed
Auto merge of rust-lang#132479 - compiler-errors:fx-feat-yeet, r=fee1-dead
Yeet the `effects` feature, move it onto `const_trait_impl`
This PR merges the `effects` feature into the `const_trait_impl` feature. There's really no need to have two feature gates for one feature.
After this PR, if `const_trait_impl` **is** enabled:
* Users can use and define const traits
* `HostEffect` const conditions will be enforced on the HIR
* We re-check the predicates in MIR just to make sure that we don't "leak" anything during MIR lowering
And if `const_trait_impl` **is not** enabled:
* Users cannot use nor define const traits
* `HostEffect` const conditions are not enforced on the HIR
* We will raise a const validation error if we call a function that has any const conditions (i.e. const traits and functions with any `~const` in their where clasues)
This should be the last step for us to be able to enable const traits in the standard library. We still need to re-constify `Drop` and `Destruct` and stuff for const traits to be particularly *useful* for some cases, but this is a good step :D
r? fee1-dead
cc `@rust-lang/project-const-traits`File tree
221 files changed
+370
-1025
lines changed- compiler
- rustc_ast_passes/src
- rustc_const_eval/src
- check_consts
- const_eval
- rustc_feature/src
- rustc_hir_analysis/src
- check
- hir_ty_lowering
- impl_wf_check
- rustc_hir_typeck/src
- rustc_middle/src/ty
- rustc_next_trait_solver/src/solve
- rustc_passes/src
- rustc_trait_selection/src
- error_reporting/traits
- traits
- select
- rustc_ty_utils/src
- rustc_type_ir/src
- library/core/src
- ffi
- ops
- src
- librustdoc/clean
- tools/clippy
- clippy_utils/src
- tests/ui/missing_const_for_fn
- tests
- crashes
- rustdoc
- inline_cross/auxiliary
- ui
- const-generics
- generic_const_exprs
- issues
- consts
- auxiliary
- delegation
- dropck
- generic-const-items
- intrinsics
- parser
- specialization
- stability-attribute
- traits
- const-traits
- auxiliary
- const_derives
- effects
- auxiliary
- specialization
- next-solver/canonical
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
221 files changed
+370
-1025
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
597 | | - | |
598 | | - | |
| 597 | + | |
| 598 | + | |
599 | 599 | | |
600 | 600 | | |
601 | 601 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| |||
419 | 418 | | |
420 | 419 | | |
421 | 420 | | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
| 421 | + | |
| 422 | + | |
429 | 423 | | |
430 | 424 | | |
431 | 425 | | |
| |||
663 | 657 | | |
664 | 658 | | |
665 | 659 | | |
666 | | - | |
667 | | - | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
668 | 663 | | |
669 | 664 | | |
670 | 665 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
434 | | - | |
| 434 | + | |
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
103 | 106 | | |
104 | 107 | | |
105 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
465 | | - | |
466 | | - | |
467 | 465 | | |
468 | 466 | | |
469 | 467 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
209 | 208 | | |
210 | 209 | | |
211 | 210 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
566 | | - | |
567 | 566 | | |
568 | 567 | | |
569 | 568 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
462 | | - | |
| 462 | + | |
463 | 463 | | |
464 | 464 | | |
465 | 465 | | |
| |||
0 commit comments